зеркало из https://github.com/github/ruby.git
* lib/webrick/httprequest.rb (read_request_line): extend max
length to 2083. This is from Internet Explorer's max uri length. http://support.microsoft.com/kb/208427 [ruby-core:32924] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
492d120877
Коммит
a671a06d25
|
@ -1,3 +1,9 @@
|
|||
Thu Oct 28 12:06:54 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/webrick/httprequest.rb (read_request_line): extend max
|
||||
length to 2083. This is from Internet Explorer's max uri
|
||||
length. http://support.microsoft.com/kb/208427 [ruby-core:32924]
|
||||
|
||||
Thu Oct 28 04:00:08 2010 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (GC.stat): added. [ruby-dev:38607]
|
||||
|
|
|
@ -251,9 +251,11 @@ module WEBrick
|
|||
|
||||
private
|
||||
|
||||
MAX_URI_LENGTH = 2083 # :nodoc:
|
||||
|
||||
def read_request_line(socket)
|
||||
@request_line = read_line(socket, 1024) if socket
|
||||
if @request_line.bytesize >= 1024 and @request_line[-1, 1] != LF
|
||||
@request_line = read_line(socket, MAX_URI_LENGTH) if socket
|
||||
if @request_line.bytesize >= MAX_URI_LENGTH and @request_line[-1, 1] != LF
|
||||
raise HTTPStatus::RequestURITooLarge
|
||||
end
|
||||
@request_time = Time.now
|
||||
|
|
Загрузка…
Ссылка в новой задаче