AJAX problem with Lighttpd and jQuery
Thursday, April 16, 2009
While converting the environment of one of my business projects from Apache to Lighttpd, I experienced a problem, which didn't occur with Apache before. The following code worked fine in Aapache:$.post('http://example.com/ajax');When executing the same request to Lighttpd, you receive the following error message:411 - Length RequiredThe solution was pretty simple, thought I only found it because it was working in another place with a similar case. The solution is to add an empty POST-object to the request (which will then send the content-length header):$.post('http://example.com/ajax', {});Hopefully this will help somone who experienced the same problem.
Comments to this article
Leave a comment
Please note that your email address will not be shown, it is only used to fetch your avatar image from gravatar.com and for notifications.


nice, very nice ;)