lib/www/mechanize/chain/header_resolver.rb in mechanize-0.8.3 vs lib/www/mechanize/chain/header_resolver.rb in mechanize-0.8.4

- old
+ new

@@ -21,10 +21,11 @@ else request['Connection'] = 'close' end request['Accept-Encoding'] = 'gzip,identity' request['Accept-Language'] = 'en-us,en;q=0.5' - request['Host'] = uri.host + host = "#{uri.host}#{uri.port.to_i == 80 ? '' : ':' + uri.port.to_s}" + request['Host'] = host request['Accept-Charset'] = 'ISO-8859-1,utf-8;q=0.7,*;q=0.7' unless @cookie_jar.empty?(uri) cookies = @cookie_jar.cookies(uri) cookie = cookies.length > 0 ? cookies.join("; ") : nil