assaf/zombie — Issue #204: Support content-length header for application/x-www-form-urlencoded too
Author: sbange
Created: 2011-11-21 20:47:06+00:00
State: open

XHR post requests issued containing application/x-www-form-urlencoded form data will not send a content-length header. Some servers such as nginx require this or they will respond with status 411.

Maybe I got the specs wrong but as far as I understand it, content-length should always be send if possible (or forbidden by the rules :-)).

Just to test this I added 'headers["content-length"] ||= stringify(data).length' after line 178 in 'resources.coffee'. Still stringfy() is called twice in this case and the rules from RFC 2616 4.4 are not considered.

Is there a reason for this behavior or could we patch this?