1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

http parser errors (malformed requests) now log to the default log.

Request data and parameters on http parser error will still only log in debug mode. Closes [#11423].

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@661 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
wayneeseguin 2007-10-17 01:45:37 +00:00
parent 834234649a
commit 85a3ee1b92

View file

@ -660,8 +660,8 @@ module Mongrel
rescue EOFError,Errno::ECONNRESET,Errno::EPIPE,Errno::EINVAL,Errno::EBADF
client.close rescue nil
rescue HttpParserError
STDERR.puts "#{Time.now}: HTTP PARSE ERROR, MALFORMED REQUEST (#{params[Const::HTTP_X_FORWARDED_FOR] || client.peeraddr.last}): #$!"
if $mongrel_debug_client
STDERR.puts "#{Time.now}: BAD CLIENT (#{params[Const::HTTP_X_FORWARDED_FOR] || client.peeraddr.last}): #$!"
STDERR.puts "#{Time.now}: REQUEST DATA: #{data.inspect}\n---\nPARAMS: #{params.inspect}\n---\n"
end
rescue Errno::EMFILE