mechanize 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of mechanize might be problematic. Click here for more details.

Files changed (3) hide show
  1. data/CHANGELOG.txt +4 -0
  2. data/lib/www/mechanize.rb +2 -2
  3. metadata +2 -2
data/CHANGELOG.txt CHANGED
@@ -1,5 +1,9 @@
1
1
  = Mechanize CHANGELOG
2
2
 
3
+ == 0.7.2
4
+
5
+ * Handling gzipped responses with no Content-Length header
6
+
3
7
  == 0.7.1
4
8
 
5
9
  * Added iPhone to the user agent aliases. [#17572]
data/lib/www/mechanize.rb CHANGED
@@ -38,7 +38,7 @@ module WWW
38
38
  class Mechanize
39
39
  ##
40
40
  # The version of Mechanize you are using.
41
- VERSION = '0.7.1'
41
+ VERSION = '0.7.2'
42
42
 
43
43
  ##
44
44
  # User Agent aliases
@@ -536,7 +536,7 @@ module WWW
536
536
  case encoding.downcase
537
537
  when 'gzip'
538
538
  log.debug('gunzip body') if log
539
- if response['Content-Length'].to_i > 0
539
+ if response['Content-Length'].to_i > 0 || body.length > 0
540
540
  Zlib::GzipReader.new(body).read
541
541
  else
542
542
  ''
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mechanize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-04 00:00:00 -08:00
12
+ date: 2008-03-06 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency