summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-19 14:31:24 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-19 14:31:24 +0000
commita4874e20ae678606715fb40de8305e4368bd453e (patch)
treec94a3a3dbea16dbb611d4edb99228ddd6e3efbb5
parentc1e9ce9ca6d888cc18d945c916db4f4acd685d6b (diff)
* lib/webrick/httprequest.rb (meta_vers): should not set
HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH. * lib/webrick/https.rb (HTTPRequest#parse): should check presence of cert() method to detect SSLSocket. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--lib/webrick/httprequest.rb2
-rw-r--r--lib/webrick/https.rb4
3 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index be46652dda..fe8367e184 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Dec 19 21:24:22 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
+
+ * lib/webrick/httprequest.rb (meta_vers): should not set
+ HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH.
+
+ * lib/webrick/https.rb (HTTPRequest#parse): should check presence
+ of cert() method to detect SSLSocket.
+
Fri Dec 19 22:56:46 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* lib/soap/property.rb (SOAP::Property#load): new method for loading
diff --git a/lib/webrick/httprequest.rb b/lib/webrick/httprequest.rb
index a25c9933c5..455e94c08c 100644
--- a/lib/webrick/httprequest.rb
+++ b/lib/webrick/httprequest.rb
@@ -190,6 +190,8 @@ module WEBrick
meta["SERVER_SOFTWARE"] = @config[:ServerSoftware].dup
self.each{|key, val|
+ next if /content-type/ =~ key
+ next if /content-length/ =~ key
name = "HTTP_" + key
name.gsub!(/-/o, "_")
name.upcase!
diff --git a/lib/webrick/https.rb b/lib/webrick/https.rb
index 0d8ebd2ba3..45db229c59 100644
--- a/lib/webrick/https.rb
+++ b/lib/webrick/https.rb
@@ -21,8 +21,8 @@ module WEBrick
alias orig_parse parse
def parse(socket=nil)
- if socket && socket.is_a?(OpenSSL::SSL::SSLSocket)
- @server_cert = @config[:SSLCertificate]
+ if socket.respond_to?(:cert)
+ @server_cert = socket.cert || @config[:SSLCertificate]
@client_cert = socket.peer_cert
@client_cert_chain = socket.peer_cert_chain
@cipher = socket.cipher