activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-931) Improve HTTP upgrade connection
Date Fri, 20 Jan 2017 14:33:26 GMT

    [ https://issues.apache.org/jira/browse/ARTEMIS-931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15831818#comment-15831818
] 

ASF GitHub Bot commented on ARTEMIS-931:
----------------------------------------

GitHub user jmesnil opened a pull request:

    https://github.com/apache/activemq-artemis/pull/975

    [ARTEMIS-931] Improve HTTP Upgrade connection

    If the object received is not an expected HttpResponse, close the
    ChannelHandlerContext and countdown the latch
    
    JIRA: https://issues.apache.org/jira/browse/ARTEMIS-931

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jmesnil/activemq-artemis ARTEMIS-931_improve_http-upgrade_connection

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/975.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #975
    
----
commit 5a59cd19f82bd7dd93919ad09470d2feda21de49
Author: Jeff Mesnil <jmesnil@gmail.com>
Date:   2017-01-20T14:22:25Z

    [ARTEMIS-931] Improve HTTP Upgrade connection
    
    If the object received is not an expected HttpResponse, close the
    ChannelHandlerContext and countdown the latch
    
    JIRA: https://issues.apache.org/jira/browse/ARTEMIS-931

----


> Improve HTTP upgrade connection
> -------------------------------
>
>                 Key: ARTEMIS-931
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-931
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.5.2
>            Reporter: Jeff Mesnil
>
> When Artemis connector is configured to use http-upgrade, it will send an HTTP request
to the server to perform the upgrade handshake and wait for response for 30 seconds maximum.
> The code in HttpUpgradeHandler#channelRead0 checks if the received object from the server
is a HttpResponse and check its header.
> However if the received object is not an HttpResponse (e.g. a LastHttpContent if the
web server is suspended and returns a 404 with a text content), the code does not close the
context and does not countdown the latch.
> This results in a 30s block for the client when we already know that the connection will
not be possible.
> Improving code in  HttpUpgradeHandler#channelRead0 will remove this 30s wait time and
ensure a fast dectection from the client so that it can try to connect to another server for
example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message