I think the Mod-Auth-SSPI is conflicting my ajax system. Please find the below code -
displayInfo(transport.responseText.evalJSON(true)); // error occurs
alert('Damn! It's not working...');
it always returns the alert('Damn! It's not working...'). That means the displayInfo is not working or conflicting with something. Can anyone tell me how to resolve it ?
Please note that, Mod-Auth-SSPI is working correctly as per my need.
I had a similar problem with Ajax and Internet Explorer (v6 and 8). If you watch the network traffic, you can see that IE begins by sending an empty POST request (content-length: 0) that trigger the NTLM auth, then send the correct POST with the full body.
The bug happens when IE uses an already established TCP/IP connection to Apache/mod_auth_sspi. With the default settings, mod_auth_sspi let the empty POST request pass through, since the connection has been authentified. And your app receive an empty POST request, which probably puzzles it.
One of the solution is to add the instruction 'SSPIPerRequestAuth On' in your Apache config, as said here :
(at the time of this writing, the /doc in the source of mod_auth_sspi is unfortunately not up to date)
One other, on a old mod_sspi install, was to add 'MaxKeepAliveRequests 2' and 'KeepAliveTimeout 1', which is dirty but could come to help.