Browse Source

2010-03-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

	Redefined the maximum length of buffer used for HTTP header.
	* src/HttpHeaderProcessor.cc
Tatsuhiro Tsujikawa 15 năm trước cách đây
mục cha
commit
522ab21ebf
2 tập tin đã thay đổi với 12 bổ sung1 xóa
  1. 5 0
      ChangeLog
  2. 7 1
      src/HttpHeaderProcessor.cc

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2010-03-23  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
+
+	Redefined the maximum length of buffer used for HTTP header.
+	* src/HttpHeaderProcessor.cc
+
 2010-03-22  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 
 	Code cleanup

+ 7 - 1
src/HttpHeaderProcessor.cc

@@ -46,7 +46,13 @@
 
 namespace aria2 {
 
-HttpHeaderProcessor::HttpHeaderProcessor():_limit(4096) {}
+HttpHeaderProcessor::HttpHeaderProcessor():
+  _limit(21/*lines*/*8190/*per line*/) {}
+// The above values come from Apache's documentation
+// http://httpd.apache.org/docs/2.2/en/mod/core.html: See
+// LimitRequestFieldSize and LimitRequestLine directive.  Also the
+// page states that the number of request fields rarely exceeds 20.
+// aria2 uses this class in both client and server side.
 
 HttpHeaderProcessor::~HttpHeaderProcessor() {}