You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "William R. Speirs (Created) (JIRA)" <ji...@apache.org> on 2011/11/17 01:15:52 UTC

[jira] [Created] (HTTPCORE-281) Set HttpResponse Version to HttpRequest Version Before Calling Handle

Set HttpResponse Version to HttpRequest Version Before Calling Handle
---------------------------------------------------------------------

                 Key: HTTPCORE-281
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
             Project: HttpComponents HttpCore
          Issue Type: Improvement
          Components: HttpCore, HttpCore NIO
            Reporter: William R. Speirs
            Priority: Minor


If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will attempt to keep a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.

I propose that the HttpResponse provided to the handle method be set to the version of the request. This will still allow the flexibility of the programmer to change the HTTP version number if he/she so chooses, but will provide functionality closer to what the standard describes in Sec 8.1.2.1

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (HTTPCORE-281) Server does not follow version negotiation rules correctly

Posted by "William R. Speirs (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William R. Speirs updated HTTPCORE-281:
---------------------------------------

    Attachment: HTTPCORE-281v2.diff

Updated patch which includes a unit test and no noise
                
> Server does not follow version negotiation rules correctly
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-281
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore, HttpCore NIO
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-281.diff, HTTPCORE-281v2.diff
>
>
> If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.
> RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (HTTPCORE-281) Server does not follow version negotiation rules correctly

Posted by "Oleg Kalnichevski (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152327#comment-13152327 ] 

Oleg Kalnichevski commented on HTTPCORE-281:
--------------------------------------------

Sorry about being picky.

(1) a test case would be nice.
(2) you should do version comparison using #lessThan #greaterThan methods in order to handle versions lesser than 1.0 the same way. 
(3) ideally there should be no 'noise' in the patch

Oleg
                
> Server does not follow version negotiation rules correctly
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-281
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore, HttpCore NIO
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-281.diff
>
>
> If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.
> RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (HTTPCORE-281) Server does not follow version negotiation rules correctly

Posted by "William R. Speirs (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William R. Speirs updated HTTPCORE-281:
---------------------------------------

       Priority: Major  (was: Minor)
    Description: 
If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.

RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

  was:
If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will attempt to keep a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.

I propose that the HttpResponse provided to the handle method be set to the version of the request. This will still allow the flexibility of the programmer to change the HTTP version number if he/she so chooses, but will provide functionality closer to what the standard describes in Sec 8.1.2.1

     Issue Type: Bug  (was: Improvement)
        Summary: Server does not follow version negotiation rules correctly  (was: Set HttpResponse Version to HttpRequest Version Before Calling Handle)
    
> Server does not follow version negotiation rules correctly
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-281
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore, HttpCore NIO
>            Reporter: William R. Speirs
>
> If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.
> RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Resolved] (HTTPCORE-281) Server does not follow version negotiation rules correctly

Posted by "Oleg Kalnichevski (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-281.
----------------------------------------

    Resolution: Fixed

Patch committed to SVN trunk and 4.1.x branch.

Oleg
                
> Server does not follow version negotiation rules correctly
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-281
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore, HttpCore NIO
>            Reporter: William R. Speirs
>             Fix For: 4.1.4, 4.2-alpha3
>
>         Attachments: HTTPCORE-281.diff, HTTPCORE-281v2.diff
>
>
> If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.
> RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (HTTPCORE-281) Server does not follow version negotiation rules correctly

Posted by "William R. Speirs (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William R. Speirs updated HTTPCORE-281:
---------------------------------------

    Attachment: HTTPCORE-281.diff
    
> Server does not follow version negotiation rules correctly
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-281
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore, HttpCore NIO
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-281.diff
>
>
> If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.
> RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (HTTPCORE-281) Server does not follow version negotiation rules correctly

Posted by "Oleg Kalnichevski (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152374#comment-13152374 ] 

Oleg Kalnichevski commented on HTTPCORE-281:
--------------------------------------------

The logic looks correct as long as it can also handle 0.9. 

The 'noise' in the patch are non-functional changes due to extra whitespace, different formatting, etc that makes it more difficult to review the patch and to understand the changes. Usually the shorter a patch the better.

Oleg
                
> Server does not follow version negotiation rules correctly
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-281
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore, HttpCore NIO
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-281.diff
>
>
> If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.
> RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (HTTPCORE-281) Server does not follow version negotiation rules correctly

Posted by "Oleg Kalnichevski (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski updated HTTPCORE-281:
---------------------------------------

    Fix Version/s: 4.2-alpha3
                   4.1.4
    
> Server does not follow version negotiation rules correctly
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-281
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore, HttpCore NIO
>            Reporter: William R. Speirs
>             Fix For: 4.1.4, 4.2-alpha3
>
>         Attachments: HTTPCORE-281.diff, HTTPCORE-281v2.diff
>
>
> If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.
> RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (HTTPCORE-281) Server does not follow version negotiation rules correctly

Posted by "William R. Speirs (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152228#comment-13152228 ] 

William R. Speirs commented on HTTPCORE-281:
--------------------------------------------

I didn't realize the request was carried around in the context, so I believe adding the additional else if case to the RequestConnControl (see patch above) is all which is needed to fix this issue. Please review...
                
> Server does not follow version negotiation rules correctly
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-281
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore, HttpCore NIO
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-281.diff
>
>
> If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.
> RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Issue Comment Edited] (HTTPCORE-281) Server does not follow version negotiation rules correctly

Posted by "William R. Speirs (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152345#comment-13152345 ] 

William R. Speirs edited comment on HTTPCORE-281 at 11/17/11 9:27 PM:
----------------------------------------------------------------------

Not being picky at all...

1) Yea, it was an incomplete patch. I wanted to make sure I had the functionality down and wasn't missing something from the RFC. Does the logic look correct?

2) Good feedback, thanks!

3) What was the noise? The newlines? Personally I'm a fan of whitespace as it makes if blocks easier to read, but I can remove that if it's what you're talking about.

Thanks...
                
      was (Author: wspeirs):
    Not being picky at all...

1) Yea, it was an incomplete patch. I wanted to make sure I had the functionality down and wasn't missing something from the RFC. Does the logic look correct?

2) Good feedback, thanks!

3) What was noise? The newlines? Personally I'm a fan of whitespace as it makes if blocks easier to read, but I can remove that if it's what you're talking about.

Thanks...
                  
> Server does not follow version negotiation rules correctly
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-281
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore, HttpCore NIO
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-281.diff
>
>
> If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.
> RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (HTTPCORE-281) Server does not follow version negotiation rules correctly

Posted by "William R. Speirs (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152345#comment-13152345 ] 

William R. Speirs commented on HTTPCORE-281:
--------------------------------------------

Not being picky at all...

1) Yea, it was an incomplete patch. I wanted to make sure I had the functionality down and wasn't missing something from the RFC. Does the logic look correct?

2) Good feedback, thanks!

3) What was noise? The newlines? Personally I'm a fan of whitespace as it makes if blocks easier to read, but I can remove that if it's what you're talking about.

Thanks...
                
> Server does not follow version negotiation rules correctly
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-281
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-281
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore, HttpCore NIO
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-281.diff
>
>
> If a request is made with HTTP/1.0 and a response is provided with HTTP/1.1 the server will incorrectly treat the entire connection as 1.1 by keeping a connection open with the client. Some clients (ab for example) will simply hang waiting for the server to close the connection.
> RFC 2145 (http://www.faqs.org/rfcs/rfc2145.html) describes HTTP version numbers and how clients and servers should act.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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