Permalink
Browse files

accept */* but prefer xml for backward compatibility

  • Loading branch information...
1 parent 1f55b44 commit b2dda517e44565bc72ef119416e2166486a6bdf0 @adamwiggins committed Jul 22, 2009
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/restclient/request.rb
  2. +2 −2 spec/request_spec.rb
@@ -232,7 +232,7 @@ def display_log(msg)
end
def default_headers
- { :accept => 'application/xml', :accept_encoding => 'gzip, deflate' }
+ { :accept => '*/*; q=0.5, application/xml', :accept_encoding => 'gzip, deflate' }
end
end
end
View
@@ -17,8 +17,8 @@
@net.stub!(:verify_mode=)
end
- it "requests xml mimetype" do
- @request.default_headers[:accept].should == 'application/xml'
+ it "accept */* mimetype, preferring xml" do
+ @request.default_headers[:accept].should == '*/*; q=0.5, application/xml'
end
it "decodes an uncompressed result body by passing it straight through" do

0 comments on commit b2dda51

Please sign in to comment.