<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -175,7 +175,7 @@ module RestClient
 
 			net.start do |http|
 				http.read_timeout = @timeout if @timeout
-				res = http.request(req, payload || &quot;&quot;)
+				res = http.request(req, payload)
 				display_log response_log(res)
 				process_result res
 			end</diff>
      <filename>lib/rest_client.rb</filename>
    </modified>
    <modified>
      <diff>@@ -160,8 +160,8 @@ describe RestClient do
 			@request.transmit(@uri, 'req', 'payload')
 		end
 
-		it &quot;doesn't send nil payloads&quot; do
-			@http.should_receive(:request).with('req', '')
+		it &quot;sends nil payloads&quot; do
+			@http.should_receive(:request).with('req', nil)
 			@request.should_receive(:process_result)
 			@request.stub!(:response_log)
 			@request.transmit(@uri, 'req', nil)</diff>
      <filename>spec/rest_client_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>dd37895b6fff186a0ae4ce9e1ac7305a5fc2fbcc</id>
    </parent>
  </parents>
  <author>
    <name>Coda Hale</name>
    <email>coda.hale@gmail.com</email>
  </author>
  <url>http://github.com/pedro/rest-client/commit/847ac7f5f3291533dfc0297e7b0be8c55ce7182e</url>
  <id>847ac7f5f3291533dfc0297e7b0be8c55ce7182e</id>
  <committed-date>2008-12-19T02:31:42-08:00</committed-date>
  <authored-date>2008-12-09T18:05:26-08:00</authored-date>
  <message>Allow for the sending of nil payloads.

If a blank string is used in place of nil to mean &quot;no request entity&quot;,
Net::HTTP::HTTPGenericRequest#supply_default_content_type is called, which
sets the request's Content-Type to application/x-www-form-urlencoded.

This is problematic, because many servers will return a 406 Not Acceptable,
indicating that the given resource cannot accept request entities of that
type.

By using nil as the &quot;no request entity&quot; sigil, Net::HTTP::HTTPGenericRequest
will not automatically append a Content-Type to the request, resovling this
issue.</message>
  <tree>ab8429cf74c13955c3cece04b69f480692d85926</tree>
  <committer>
    <name>Adam Wiggins</name>
    <email>adam@heroku.com</email>
  </committer>
</commit>
