commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbe...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server HttpServiceHandler.java SimpleConnectionThread.java ProxyRequestHandler.java SimpleHttpServerConnection.java
Date Sat, 13 Nov 2004 22:38:27 GMT
mbecke      2004/11/13 14:38:27

  Modified:    httpclient/src/test/org/apache/commons/httpclient
                        TestBadContentLength.java
               httpclient/src/test/org/apache/commons/httpclient/server
                        HttpServiceHandler.java SimpleConnectionThread.java
                        ProxyRequestHandler.java
                        SimpleHttpServerConnection.java
  Log:
  Renamed SimpleHttpServerConnection.connectionKeepAlive() to setKeepAlive().
  
  Submitted by: Michael Becke
  
  Revision  Changes    Path
  1.10      +5 -5      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestBadContentLength.java
  
  Index: TestBadContentLength.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestBadContentLength.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestBadContentLength.java	7 Nov 2004 19:57:08 -0000	1.9
  +++ TestBadContentLength.java	13 Nov 2004 22:38:27 -0000	1.10
  @@ -196,7 +196,7 @@
                   out.flush();
                   // process max. 2 subsequents requests per connection
                   if (requestNo < 2) {
  -                    conn.connectionKeepAlive(true);
  +                    conn.setKeepAlive(true);
                   }
               }
               return true;
  
  
  
  1.9       +7 -7      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/HttpServiceHandler.java
  
  Index: HttpServiceHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/HttpServiceHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HttpServiceHandler.java	13 Nov 2004 12:21:28 -0000	1.8
  +++ HttpServiceHandler.java	13 Nov 2004 22:38:27 -0000	1.9
  @@ -102,19 +102,19 @@
                   if (connheader.getValue().equalsIgnoreCase("keep-alive")) {
                       Header header = new Header("Connection", "keep-alive"); 
                       response.addHeader(header);
  -                    conn.connectionKeepAlive(true);
  +                    conn.setKeepAlive(true);
                   }
                   if (connheader.getValue().equalsIgnoreCase("close")) {
                       Header header = new Header("Connection", "close"); 
                       response.addHeader(header);
  -                    conn.connectionKeepAlive(false);
  +                    conn.setKeepAlive(false);
                   }
               } else {
                   // Use protocol default connection policy
                   if (response.getHttpVersion().greaterEquals(HttpVersion.HTTP_1_1)) {
  -                    conn.connectionKeepAlive(true);
  +                    conn.setKeepAlive(true);
                   } else {
  -                    conn.connectionKeepAlive(false);
  +                    conn.setKeepAlive(false);
                   }
               }
           }
  
  
  
  1.3       +4 -4      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/SimpleConnectionThread.java
  
  Index: SimpleConnectionThread.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/SimpleConnectionThread.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleConnectionThread.java	13 Nov 2004 12:21:28 -0000	1.2
  +++ SimpleConnectionThread.java	13 Nov 2004 22:38:27 -0000	1.3
  @@ -91,7 +91,7 @@
       public void run() {
           try {
               do {
  -                this.conn.connectionKeepAlive(false);
  +                this.conn.setKeepAlive(false);
                   SimpleRequest request = this.conn.readRequest();
                   if (request != null) {
                       this.handler.processRequest(this.conn, request);
  
  
  
  1.10      +13 -13    jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/ProxyRequestHandler.java
  
  Index: ProxyRequestHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/ProxyRequestHandler.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ProxyRequestHandler.java	13 Nov 2004 12:21:28 -0000	1.9
  +++ ProxyRequestHandler.java	13 Nov 2004 22:38:27 -0000	1.10
  @@ -107,24 +107,24 @@
                   String s = connheader.getValue(); 
                   if (s.equalsIgnoreCase("close")) {
                       response.setHeader(new Header("Proxy-Connection", "close"));
  -                    conn.connectionKeepAlive(false);
  -                    proxyconn.connectionKeepAlive(false);
  +                    conn.setKeepAlive(false);
  +                    proxyconn.setKeepAlive(false);
                       response.removeHeaders("Connection");
                   }
                   if (s.equalsIgnoreCase("keep-alive")) {
                       response.setHeader(new Header("Proxy-Connection", "keep-alive"));
  -                    conn.connectionKeepAlive(true);
  -                    proxyconn.connectionKeepAlive(true);
  +                    conn.setKeepAlive(true);
  +                    proxyconn.setKeepAlive(true);
                       response.removeHeaders("Connection");
                   }
               } else {
                   // Use protocol default connection policy
                   if (response.getHttpVersion().greaterEquals(HttpVersion.HTTP_1_1)) {
  -                    conn.connectionKeepAlive(true);
  -                    proxyconn.connectionKeepAlive(true);
  +                    conn.setKeepAlive(true);
  +                    proxyconn.setKeepAlive(true);
                   } else {
  -                    conn.connectionKeepAlive(false);
  -                    proxyconn.connectionKeepAlive(false);
  +                    conn.setKeepAlive(false);
  +                    proxyconn.setKeepAlive(false);
                   }
               }
               if ("HEAD".equalsIgnoreCase(request.getRequestLine().getMethod())) {
  @@ -136,10 +136,10 @@
           } catch (HttpException e) {
               SimpleResponse response = ErrorResponse.getResponse(HttpStatus.SC_BAD_REQUEST);
               conn.writeResponse(response);
  -            proxyconn.connectionKeepAlive(false);
  +            proxyconn.setKeepAlive(false);
           } catch (IOException e) {
               LOG.warn(e.getMessage());
  -            proxyconn.connectionKeepAlive(false);
  +            proxyconn.setKeepAlive(false);
           } finally {
               this.connmanager.releaseConnection(host, proxyconn);
           }
  
  
  
  1.20      +6 -6      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/SimpleHttpServerConnection.java
  
  Index: SimpleHttpServerConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/SimpleHttpServerConnection.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- SimpleHttpServerConnection.java	13 Nov 2004 12:21:28 -0000	1.19
  +++ SimpleHttpServerConnection.java	13 Nov 2004 22:38:27 -0000	1.20
  @@ -88,7 +88,7 @@
           return this.socket != null;
       }
       
  -    public void connectionKeepAlive(boolean b) {
  +    public void setKeepAlive(boolean b) {
           this.keepAlive = b;
       }
   
  @@ -121,7 +121,7 @@
               } while (line != null && line.length() == 0);
   
               if (line == null) {
  -                connectionKeepAlive(false);
  +                setKeepAlive(false);
                   return null;
               }
               SimpleRequest request = new SimpleRequest( 
  @@ -143,7 +143,7 @@
               } while (line != null && line.length() == 0);
   
               if (line == null) {
  -                connectionKeepAlive(false);
  +                setKeepAlive(false);
                   return null;
               }
               SimpleResponse response = new SimpleResponse(
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message