mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/http.rb: should not overwrite HTTP request header. [ruby-list:39543]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4cb5136223
commit
d938ed8875
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Apr 13 19:54:29 2004 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* lib/net/http.rb: should not overwrite HTTP request header.
|
||||
[ruby-list:39543]
|
||||
|
||||
Tue Apr 13 01:30:00 2004 Gavin Sinclair <gsinclair@soyabean.com.au>
|
||||
|
||||
* ext/iconv/iconv.c: RDoc documentation (from RD; nearly finished).
|
||||
|
|
|
@ -819,7 +819,7 @@ module Net # :nodoc:
|
|||
def request(req, body = nil, &block) # :yield: +response+
|
||||
unless started?
|
||||
start {
|
||||
req['connection'] = 'close'
|
||||
req['connection'] ||= 'close'
|
||||
return request(req, body, &block)
|
||||
}
|
||||
end
|
||||
|
@ -848,12 +848,12 @@ module Net # :nodoc:
|
|||
on_connect
|
||||
end
|
||||
if @seems_1_0_server
|
||||
req['connection'] = 'close'
|
||||
req['connection'] ||= 'close'
|
||||
end
|
||||
if not req.response_body_permitted? and @close_on_empty_response
|
||||
req['connection'] = 'close'
|
||||
req['connection'] ||= 'close'
|
||||
end
|
||||
req['host'] = addr_port()
|
||||
req['host'] ||= addr_port()
|
||||
end
|
||||
|
||||
def end_transport(req, res)
|
||||
|
|
Loading…
Add table
Reference in a new issue