diff options
| author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-04 16:03:30 +0000 |
|---|---|---|
| committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-04 16:03:30 +0000 |
| commit | 8695fc5ba159c1c8ec4c4c04f56eaf3a9a174e19 (patch) | |
| tree | 940ead37327f93e4ee5af86ed3d56e382948a477 /lib | |
| parent | e5ed3f059b5d9827fd3fd7709edd89e030461171 (diff) | |
| download | ruby-8695fc5ba159c1c8ec4c4c04f56eaf3a9a174e19.tar.gz ruby-8695fc5ba159c1c8ec4c4c04f56eaf3a9a174e19.tar.xz ruby-8695fc5ba159c1c8ec4c4c04f56eaf3a9a174e19.zip | |
* lib/net/http.rb (HTTPHeader#initialize): provide default User-Agent to fix 500 error on some corrupted HTTP servers. [ruby-core:13135]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/net/http.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 29377fc47..19f0983a3 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1533,6 +1533,7 @@ module Net #:nodoc: @path = path initialize_http_header initheader self['Accept'] ||= '*/*' + self['User-Agent'] ||= 'Ruby' @body = nil @body_stream = nil end |
