aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-03-05 09:35:32 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-03-05 09:35:32 +0000
commit63079969660592d464734b70ac2a2a90a1d297ea (patch)
treed1c8a609e2269e2ab381bd080b54b273c7e6f10a
parentec6122bc2a5604cb386c9585f4faf14cdf564087 (diff)
downloadruby-63079969660592d464734b70ac2a2a90a1d297ea.tar.gz
* lib/net/http.rb (send_request_with_body): #content_type never return false, use #main_type instead. [ruby-core:07476]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/net/http.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3cddc29e8e..77e6441bf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Mar 5 18:35:03 2006 Minero Aoki <aamine@loveruby.net>
+
+ * lib/net/http.rb (send_request_with_body): #content_type never
+ return false, use #main_type instead. [ruby-core:07476]
+
Sat Mar 4 15:26:40 2006 Tanaka Akira <akr@m17n.org>
* gc.c (id2ref): fix symbol test.
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 3f05d81073..87f42bfb66 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -1176,7 +1176,7 @@ module Net #:nodoc:
#
def add_field(key, val)
if @header.key?(key.downcase)
- @header[key.downcase].concat [val]
+ @header[key.downcase].push val
else
@header[key.downcase] = [val]
end
@@ -1504,7 +1504,7 @@ module Net #:nodoc:
def send_request_with_body(sock, ver, path, body)
self.content_length = body.length
delete 'Transfer-Encoding'
- unless content_type()
+ unless main_type()
warn 'net/http: warning: Content-Type did not set; using application/x-www-form-urlencoded' if $VERBOSE
set_content_type 'application/x-www-form-urlencoded'
end