kamu-wang 0.04 → 0.05

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/lib/wang.rb +4 -4
  2. data/rakefile +1 -1
  3. data/wang.gemspec +1 -1
  4. metadata +1 -1
data/lib/wang.rb CHANGED
@@ -187,14 +187,14 @@ module WANG
187
187
 
188
188
  def generate_request_headers request_method, uri, referer
189
189
  request_path = uri.path + (uri.query.nil? ? '' : "?#{uri.query}")
190
- request_host = uri.host + (uri.port ? ":#{uri.port}" : '')
190
+ request_host = uri.host + ((uri.port && uri.port != 80) ? ":#{uri.port}" : '')
191
191
  [
192
192
  "#{request_method} #{@proxy_host ? uri.to_s : request_path} HTTP/1.1",
193
193
  "Host: #{request_host}",
194
- "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12",
194
+ "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0",
195
195
  "Accept: application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5",
196
196
  "Accept-Language: en-us,en;q=0.5",
197
- "Accept-Encoding: gzip,deflate,identity",
197
+ "Accept-Encoding: gzip,deflate",
198
198
  "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7",
199
199
  "Keep-Alive: 300",
200
200
  "Connection: #{@no_keepalive ? "close" : "keep-alive"}",
@@ -272,7 +272,7 @@ module WANG
272
272
  end
273
273
 
274
274
  def follow_redirect location
275
- @log.debug(location.inspect)
275
+ @log.debug("Redirect to #{location.inspect}")
276
276
  dest = location.to_uri
277
277
  get(dest)
278
278
  end
data/rakefile CHANGED
@@ -8,7 +8,7 @@ task :default => [:test]
8
8
  spec = Gem::Specification.new do |s|
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.name = 'wang'
11
- s.version = "0.01"
11
+ s.version = "0.05"
12
12
  s.summary = "Web Access with No Grief."
13
13
  s.authors = ["Kamu", "Joux3"]
14
14
  s.email = "mr.kamu@gmail.com"
data/wang.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.platform = Gem::Platform::RUBY
3
3
  s.name = 'wang'
4
- s.version = "0.04"
4
+ s.version = "0.05"
5
5
  s.summary = "Web Access with No Grief."
6
6
  s.authors = ["Kamu", "Joux3"]
7
7
  s.email = "mr.kamu@gmail.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamu-wang
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.04"
4
+ version: "0.05"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamu