hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r538083 - in /jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio: params/HttpNIOParams.java protocol/ThrottlingHttpServiceHandler.java
Date Tue, 15 May 2007 07:58:05 GMT
Author: olegk
Date: Tue May 15 00:58:04 2007
New Revision: 538083

URL: http://svn.apache.org/viewvc?view=rev&rev=538083
Log:
HTTPCORE-72: Changed HttpConnectionParams#getSocketBufferSize() to return a non-negative value
default

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/params/HttpNIOParams.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/params/HttpNIOParams.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/params/HttpNIOParams.java?view=diff&rev=538083&r1=538082&r2=538083
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/params/HttpNIOParams.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/params/HttpNIOParams.java
Tue May 15 00:58:04 2007
@@ -64,7 +64,7 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        return params.getIntParameter(CONTENT_BUFFER_SIZE, -1);
+        return params.getIntParameter(CONTENT_BUFFER_SIZE, 1024);
     }
     
     public static void setContentBufferSize(final HttpParams params, int size) {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java?view=diff&rev=538083&r1=538082&r2=538083
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
Tue May 15 00:58:04 2007
@@ -147,10 +147,8 @@
     public void connected(final NHttpServerConnection conn) {
         HttpContext context = conn.getContext();
 
-        int bufsize = HttpNIOParams.getContentBufferSize(this.params);
-        if (bufsize < 0) {
-            bufsize = 20480;
-        }
+        int bufsize = this.params.getIntParameter(
+                HttpNIOParams.CONTENT_BUFFER_SIZE, 20480);
         ServerConnState connState = new ServerConnState(bufsize, conn); 
         context.setAttribute(CONN_STATE, connState);
 



Mime
View raw message