We have a RestFUL API we build in PHP. If we make the request:
curl -u api-key:api-passphrase https://api.domain.com/v1/product -X POST
We get back:
411 - Length Required
Though if we simply add -d "" onto the request it works and no 411 error. Is there a way to not require adding -d to the curl command?
We are using lighttpd web server, and believe its lighttpd NOT php who is returning the 411 error.
-d ""or a config lighttpd directive to set?-d ""just looks like a hack. – Justin Sep 27 '11 at 08:37-d @/dev/nullif you think that looks better. You can also use-H "Content-Length: 0". (I tested both of these, they work.) – David Schwartz Sep 27 '11 at 08:50