411 Length Required error

Caesar Indra lists at ruby-forum.com
Mon Aug 18 08:01:08 MSD 2008


Hi all

I'm having a similar issue. In Firebug, the Request Headers 
Content-Length shows 112. However, I got the 411 Content Length Required 
response.

Does any of the experts here know what's going on? Thanks in advance!

Request Headers
Host  www.xxxxx.com
User-Agent  Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; 
rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language  en-us,en;q=0.5
Accept-Encoding  gzip,deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive  300
Connection  keep-alive
X-Requested-With  XMLHttpRequest
Content-Type  application/x-www-form-urlencoded; charset=UTF-8
Referer  http://www.xxxxxx.com/people/1/edit
Content-Length  112
Cookie 
_xxxxxx_session=BAh7CjoPbGFzdF9sb2dpbnU6CVRpbWUNhh0bgAAAEI86EHJlcXVlc3RfdXJp%250AMDoMY3NyZl9pZCIlNWM1ZmYxZjlmZWQ2YmJmNTM2YWJlOGQwOGE0MjhkZDIi%250ACmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhhc2h7%250AAAY6CkB1c2VkewA6CXVzZXJvOjVBY3RpdmVSZWNvcmQ6OkFzc29jaWF0aW9u%250Aczo6QmVsb25nc1RvQXNzb2NpYXRpb24JOgtAb3duZXJvOgtEZXRhaWwIOgxA%250AcGVyc29uQAs6EEBhdHRyaWJ1dGVzewsiFXdvcmxkX3Zpc2liaWxpdHkiD2V2%250AZXJ5dGhpbmciFWluZm9ybWF0aW9uX3R5cGUiEUVtYWlsQWRkcmVzcyIPdXBk%250AYXRlZF9vbiIYMjAwOC0wOC0wNCAwNTo0OToxNSIHaWQiBjIiE2luZm9ybWF0%250AaW9uX2lkIgYxIg5wZXJzb25faWQiBjE6FkBhdHRyaWJ1dGVzX2NhY2hlewA6%250ADEBsb2FkZWRUOgxAdGFyZ2V0bzoJVXNlchc6JUBkZXRhaWxfbWVtYmVyc2hp%250AcF9yZWxhdGlvbnNoaXBzMDopQHVzZXJfcHJvZmlsZV9lbWFpbF9hZGRyZXNz%250AX3JlcXVlc3RzMDoTQGhpc3RvcnlfaXRlbXMwOxB7CiIPYWNjb3VudF9pZCIG%250AMSIVb3B0aW9uYWxfZGF0ZV9pZDAiCXR5cGUiCVVzZXIiB2lkIgYxIgxuYW1l%250AX2lkIgYxOg1AYWNjb3VudDA6KEB1c2VyX3Byb2ZpbGVfZW1haWxfYWRkcmVz%250Ac19yZXF1ZXN0MDoNQGRldGFpbHMwOiNAZGV0YWlsX2VtYWlsX2FkZHJlc3Nf%250AcmVxdWVzdHMwOhBAYmlydGhfZGF0ZTA6FEBncm91cHNfbWFuYWdlZDA6HEBl%250AbWFpbF9hZGRyZXNzX3JlcXVlc3RzMDodQG1hbmFnZXJfc3RhdHVzX3JlcXVl%250Ac3RzMDsRewA6DEBncm91cHMwOitAZGVsZXRlX3ByaW1hcnlfZW1haWxfYWRk%250AcmVzc19yZXF1ZXN0czA6EUBtZW1iZXJzaGlwczA6IUBncm91cF9tYW5hZ2Vy%250AX3JlbGF0aW9uc2hpcHMwOgpAbmFtZTA6EEByZWZsZWN0aW9ubzo0QWN0aXZl%250AUmVjb3JkOjpSZWZsZWN0aW9uOjpBc3NvY2lhdGlvblJlZmxlY3Rpb24NOhhA%250AdGhyb3VnaF9yZWZsZWN0aW9uRjoTQGFjdGl2ZV9yZWNvcmRjC0RldGFpbDoQ%250AQGNsYXNzX25hbWUiC1BlcnNvbjoLQGtsYXNzYwtQZXJzb246C0BtYWNybzoP%250AYmVsb25nc190bzoNQG9wdGlvbnN7ADskOgtwZXJzb246FkBwcmltYXJ5X2tl%250AeV9uYW1lIg5wZXJzb25faWQ%253D--2bd2eb7eff4dcf6d5f1b8290df567298516fbfe9; 
connection=efa9ce4469ee3f84e8488d939c6e82d4; email_address=xxx%40xxx.com



Chris Savery wrote:
> Ok. I used Wireshark and tracked this down. I'm posting here so that
> others will know why this happens. It is a result of poor behaviour in
> Firebug.
> 
> In fact, if you click on the log tab to view request data and headers
> then Firebug actually re-submits the POST data a second (hidden) time to
> provide data to show you. Of course, since POST methods will update
> server data and could insert new database rows this is very bad of
> Firebug. It is treating the POST like a GET in this case where it should
> have logged the original POST reply data instead. I have posted a bug in
> their google group and hopefully someday they will give it some 
> attention.
> 
> When Firebug submits the second time it does NOT include the
> Content-Length header as it did at first, but it shows as though it did.
> This is why my page was correctly updated but an 411 error was shown in
> the Firebug log. The original response was not saved and the error was
> from the repeated POST request.
> 
> Just something for people to be aware of.
> 
> Chris :)

-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list