archiloque/rest-client — Issue #116: HTTP PUT requires "Content-length" header
Author: fkmhrk
Created: 2012-02-24 04:44:38+00:00
State: open

we cannot use this client for standard nginx server because standard nginx server rejects PUT request without "Content-length" header.

lib/restclient/request.rb

def net_http_request_class(method)
Net::HTTP.const_get(method.to_s.capitalize)
end

to

def net_http_request_class(method)
c = Net::HTTP.const_get(method.to_s.capitalize)
# if method == :put
# c.["Content-Length"] = 0 # Default to 0
#end
end