Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sporkmonger/135872 to your computer and use it in GitHub Desktop.
Save sporkmonger/135872 to your computer and use it in GitHub Desktop.
From 644a88293136c3c4aafecd217b340350cf1f9ca9 Mon Sep 17 00:00:00 2001
From: Bob Aman <[email protected]>
Date: Thu, 25 Jun 2009 09:39:59 -0400
Subject: [PATCH] Fixed Content-Encoding bug with explicit default.
* If the default Content-Encoding of 7bit was given, Mechanize would
error out needlessly.
---
lib/www/mechanize/chain/body_decoding_handler.rb | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/www/mechanize/chain/body_decoding_handler.rb b/lib/www/mechanize/chain/body_decoding_handler.rb
index 60daa35..6eab187 100644
--- a/lib/www/mechanize/chain/body_decoding_handler.rb
+++ b/lib/www/mechanize/chain/body_decoding_handler.rb
@@ -34,6 +34,8 @@ module WWW
end
when 'x-gzip'
body.read
+ when '7bit'
+ body.read
else
raise 'Unsupported content encoding'
end
--
1.5.4.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment