diff --git a/lib/excon/connection.rb b/lib/excon/connection.rb index d4680061..a101c831 100644 --- a/lib/excon/connection.rb +++ b/lib/excon/connection.rb @@ -175,7 +175,7 @@ def request_kernel(params, &block) request << HTTP_1_1 # calculate content length and set to handle non-ascii - unless params[:headers].has_key?('Content-Length') + unless params[:headers].has_key?('Content-Length') || (params[:method].to_s.upcase == "GET" && params[:body].to_s.empty?) params[:headers]['Content-Length'] = case params[:body] when File params[:body].binmode