mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
492d120877
commit
a671a06d25
2 changed files with 10 additions and 2 deletions
|
@ -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>
|
Thu Oct 28 04:00:08 2010 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* gc.c (GC.stat): added. [ruby-dev:38607]
|
* gc.c (GC.stat): added. [ruby-dev:38607]
|
||||||
|
|
|
@ -251,9 +251,11 @@ module WEBrick
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
MAX_URI_LENGTH = 2083 # :nodoc:
|
||||||
|
|
||||||
def read_request_line(socket)
|
def read_request_line(socket)
|
||||||
@request_line = read_line(socket, 1024) if socket
|
@request_line = read_line(socket, MAX_URI_LENGTH) if socket
|
||||||
if @request_line.bytesize >= 1024 and @request_line[-1, 1] != LF
|
if @request_line.bytesize >= MAX_URI_LENGTH and @request_line[-1, 1] != LF
|
||||||
raise HTTPStatus::RequestURITooLarge
|
raise HTTPStatus::RequestURITooLarge
|
||||||
end
|
end
|
||||||
@request_time = Time.now
|
@request_time = Time.now
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue