set correct content type for JSON requests
This commit is contained in:
parent
edef026b24
commit
f2168738bd
|
@ -5,7 +5,8 @@ March 2016 5.3
|
||||||
- Personal/Unix: support K5KEY hash type for smbk5pwd
|
- Personal/Unix: support K5KEY hash type for smbk5pwd
|
||||||
- New NIS netgroup module for hosts
|
- New NIS netgroup module for hosts
|
||||||
- fixed bugs:
|
- fixed bugs:
|
||||||
-> autoload errors in tree view
|
-> Autoload errors in tree view
|
||||||
|
-> Set correct content type on JSON requests (174)
|
||||||
- LAM Pro:
|
- LAM Pro:
|
||||||
-> Support for LDAP views based on nsview object class
|
-> Support for LDAP views based on nsview object class
|
||||||
-> Password notification jobs support to print expiration date in email
|
-> Password notification jobs support to print expiration date in email
|
||||||
|
|
|
@ -4,7 +4,7 @@ $Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2010 Cedric Dugas and Olivier Refalo
|
Copyright (C) 2010 Cedric Dugas and Olivier Refalo
|
||||||
2011 - 2015 Roland Gruber
|
2011 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -30,6 +30,10 @@ if (strtolower(session_module_name()) == 'files') {
|
||||||
session_save_path(dirname(__FILE__) . '/../../sess');
|
session_save_path(dirname(__FILE__) . '/../../sess');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!headers_sent()) {
|
||||||
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
|
}
|
||||||
|
|
||||||
@session_start();
|
@session_start();
|
||||||
setlanguage();
|
setlanguage();
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2011 - 2015 Roland Gruber
|
Copyright (C) 2011 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -58,6 +58,7 @@ class lamAjax {
|
||||||
* Manages an AJAX request.
|
* Manages an AJAX request.
|
||||||
*/
|
*/
|
||||||
public static function handleRequest() {
|
public static function handleRequest() {
|
||||||
|
lamAjax::setHeader();
|
||||||
// check token
|
// check token
|
||||||
validateSecurityToken(false);
|
validateSecurityToken(false);
|
||||||
|
|
||||||
|
@ -89,6 +90,15 @@ class lamAjax {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets JSON HTTP header.
|
||||||
|
*/
|
||||||
|
private function setHeader() {
|
||||||
|
if (!headers_sent()) {
|
||||||
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages a password change request on the edit account page.
|
* Manages a password change request on the edit account page.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue