hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r580720 - in /jakarta/httpcomponents/httpcore/trunk: ./ module-nio/src/main/java/org/apache/http/impl/nio/
Date Sun, 30 Sep 2007 12:55:39 GMT
Author: olegk
Date: Sun Sep 30 05:55:38 2007
New Revision: 580720

URL: http://svn.apache.org/viewvc?rev=580720&view=rev
Log:
HTTPCORE-117: Fixed bug preventing NIO connections from closing the I/O session when pending
output (output session buffer is not empty)


Modified:
    jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java

Modified: jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt?rev=580720&r1=580719&r2=580720&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt (original)
+++ jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt Sun Sep 30 05:55:38 2007
@@ -1,7 +1,11 @@
 Changes since release 4.0 Alpha 5
 
+* [HTTPCORE-117] Fixed bug preventing NIO connections from closing the I/O session 
+  when pending output (output session buffer is not empty). 
+  Contributed by Oleg Kalnichevski <olegk at apache.org>
+
 * [HTTPCORE-86] Allow for optional handling of runtime exceptions
-  thrown by protocol handlers to ensurev the I/O dispatch thread
+  thrown by protocol handlers to ensure the I/O dispatch thread
   remains running.
   Contributed by Oleg Kalnichevski <olegk at apache.org>
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnection.java?rev=580720&r1=580719&r2=580720&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnection.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnection.java
Sun Sep 30 05:55:38 2007
@@ -200,6 +200,7 @@
             throw new HttpException("Request already submitted");
         }
         this.requestWriter.write(request);
+        this.hasBufferedOutput = this.outbuf.hasData();
 
         if (request instanceof HttpEntityEnclosingRequest) {
             prepareEncoder(request);

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnection.java?rev=580720&r1=580719&r2=580720&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnection.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnection.java
Sun Sep 30 05:55:38 2007
@@ -199,6 +199,7 @@
             throw new HttpException("Response already submitted");
         }
         this.responseWriter.write(response);
+        this.hasBufferedOutput = this.outbuf.hasData();
 
         if (response.getStatusLine().getStatusCode() >= 200) {
             this.connMetrics.incrementRequestCount();

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java?rev=580720&r1=580719&r2=580720&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
Sun Sep 30 05:55:38 2007
@@ -237,11 +237,7 @@
 
     public void close() throws IOException {
         this.closed = true;
-        if (this.outbuf.hasData()) {
-            this.session.setEvent(EventMask.WRITE);
-        } else {
-            this.session.close();
-        }
+        this.session.close();
     }
 
     public boolean isOpen() {



Mime
View raw message