diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/webrick/httprequest.rb | 2 | ||||
-rw-r--r-- | lib/webrick/https.rb | 4 |
2 files changed, 4 insertions, 2 deletions
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 |