Nginx 411 Error
Contents |
on Stack Overflow. Help Google Group Stack http error 411 length required Overflow Why am I getting a `411 length required` error http error 411 the request must be chunked from the REST API for updating an object? 0 votes 1 answer 8.93k views http/1.1 411 length required about 3 years ago James Jacoby PUT request gives me this error:
411 Length Required
Curl Put Content Length
GET and POST work fine. I've tried adding Content-Length, but it makes no difference. related?: http://www.lamnk.com/blog/computer/fix-nginx-411-length-required-error/ Parse.com's API is using nginx 1.2.2 - James Jacoby almost 4 years ago 1 Answer James Jacoby As mentioned in the link in my comment above, nginx doesn't support chunked encoding. check nginx version I tested outside of PHP curl without chunked encoding and it works as expected. This is what was being sent that caused the problem: PUT /1/users/fBGas65NKp HTTP/1.1 Host: api.parse.com Accept: */* Transfer-Encoding: chunked x-parse-application-id: XXX x-parse-rest-api-key: XXX x-parse-master-key: XXX content-type: application/json content-length: 225 Expect: 100-continue To disable the chunking, I had to add a blank Expect and Transfer-Encoding header as mentioned in this comment: http://www.php.net/manual/en/function.curl-setopt.php#108137 so that curl would not try to add it. I'm still having issues, but at least it's not with the API(it's curl :/) Quicklinks Parse Server Open Source Download Blog Help Docs Status Policies Need Help? Documentation Get Support Developer Community Stay Connected Get the Parse Newsletter Be the first to know about new features, new platforms, upcoming events, and more! We will never, ever spam you or sell your information. Promise. Let's Build Together
a new ticket via a REST POST using /tickets.json or /tickets.xml and am getting this response: .."\r\n