Bug 1058424 - [GSS] (6.4.x) JBossWeb does not close connection and also does not disable keep-alive when "Connection: close" specified in response header
Summary: [GSS] (6.4.x) JBossWeb does not close connection and also does not disable ke...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: DR1
: EAP 6.4.0
Assignee: Rémy Maucherat
QA Contact: Michael Cada
URL:
Whiteboard:
Depends On: 1138672
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-27 18:41 UTC by Masafumi Miura
Modified: 2019-08-19 12:43 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
potential patch / jbossweb-connection-close.patch (6.50 KB, patch)
2014-01-27 18:43 UTC, Masafumi Miura
mmiura: review?
Details | Diff

Description Masafumi Miura 2014-01-27 18:41:42 UTC
### Description of problem:

JBoss does not check "Connection: close" in response header. It should be checked and JBoss is better to disable keep-alive and close connection when  "Connection: close" exists in response header.


### Steps to Reproduce:

Access JSP or Servlet application, which set "Connection: close" in response header, running on JBoss. For example, calling response.setHeader("Connection","close"); in JSP.


### Actual results:

JBoss does not send FIN packet and the connection is still opened (keep-alived) after response is completed. 


### Expected results:

JBoss sends FIN packet and the connection is closed from JBoss after response is completed.


### Additional info:

Apache httpd and Jetty send FIN packet and the connection is closed from the servers when "Connection: close" header is specified in response. In addition, as far as I heard from the customer, Weblogic also does.

HTTP/1.1 RFC2616 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.10) states the following:

~~~
14.10 Connection

HTTP/1.1 defines the "close" connection option for the sender to signal that the connection will be closed after completion of the response. 
~~~

Comment 3 Martin Velas 2014-08-07 14:20:50 UTC
Issue is still valid for EAP 6.3.0.ER10 bits. Also the patch in the attachment is not presented in relevant JBossWeb 7.4.8.Final.

Comment 4 Rémy Maucherat 2014-09-01 13:38:35 UTC
Included in web with r2497, the system property is org.apache.coyote.http11.DEFAULT_DISABLE_UPLOAD_TIMEOUT

Comment 5 Rémy Maucherat 2014-09-01 13:39:08 UTC
Actually, org.apache.coyote.http11.DISABLE_KEEPALIVE_ON_CONCLOSE ...

Comment 6 Kabir Khan 2014-09-08 11:54:39 UTC
Fixed by component upgrade to JBoss Web 7.5.0.Beta1: https://bugzilla.redhat.com/show_bug.cgi?id=1138672

Comment 7 Radim Hatlapatka 2014-09-19 08:31:30 UTC
Verified with EAP 6.4.0.DR1.1 that based on system property org.apache.coyote.http11.DEFAULT_DISABLE_UPLOAD_TIMEOUT 
the connection is closed by sending FIN packet with org.apache.coyote.http11.DEFAULT_DISABLE_UPLOAD_TIMEOUT=true and with org.apache.coyote.http11.DEFAULT_DISABLE_UPLOAD_TIMEOUT=false it remains open.

Comment 10 Radim Hatlapatka 2014-09-19 08:46:02 UTC
Actually I meant org.apache.coyote.http11.DISABLE_KEEPALIVE_ON_CONCLOSE, thanks Masafumi for noticing.


Note You need to log in before you can comment on or make changes to this bug.