ncr / rack-proxy

A request/response rewriting HTTP proxy. A Rack app.
MIT License
269 stars 94 forks source link

Exception for POST without content-length #10

Closed rfletcher closed 11 years ago

rfletcher commented 11 years ago

When POSTing through a Rack::Proxy with a nil CONTENT_LENGTH, an exception is raised:

ArgumentError: Content-Length not given and Transfer-Encoding is not `chunked'
    rack-proxy/lib/net_http_hacked.rb:51:in `begin_request_hacked'
    rack-proxy/lib/rack/http_streaming_response.rb:54:in `response'
    rack-proxy/lib/rack/http_streaming_response.rb:14:in `status'
    rack-proxy/lib/rack/proxy.rb:47:in `perform_request'
    rack-proxy/lib/rack/proxy.rb:11:in `call'

I'm not sure if this is limited to a specific ruby version, but I'm using 1.9.3.