Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1C539200C14 for ; Tue, 7 Feb 2017 12:06:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1AE40160B4B; Tue, 7 Feb 2017 11:06:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 66464160B3E for ; Tue, 7 Feb 2017 12:06:49 +0100 (CET) Received: (qmail 61876 invoked by uid 500); 7 Feb 2017 11:06:48 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 61867 invoked by uid 99); 7 Feb 2017 11:06:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2017 11:06:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 21EA3C0D64 for ; Tue, 7 Feb 2017 11:06:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id u-XHH_OW-5yr for ; Tue, 7 Feb 2017 11:06:47 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id BBCC85FC0C for ; Tue, 7 Feb 2017 11:06:46 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A7248E05B1 for ; Tue, 7 Feb 2017 11:06:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id E5EC525294 for ; Tue, 7 Feb 2017 11:06:41 +0000 (UTC) Date: Tue, 7 Feb 2017 11:06:41 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARTEMIS-931) Improve HTTP upgrade connection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 07 Feb 2017 11:06:50 -0000 [ https://issues.apache.org/jira/browse/ARTEMIS-931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855769#comment-15855769 ] ASF subversion and git services commented on ARTEMIS-931: --------------------------------------------------------- Commit dd052026e6c5616f1f51795ea21d26f12deaf9e7 in activemq-artemis's branch refs/heads/master from [~jmesnil] [ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=dd05202 ] [ARTEMIS-931] Fix HTTP Upgrade Connection * Fix isEquivalent() method to take into account the activemqServerName property when httpUpgradeEnabled is true. Two ActiveMQ server hosted on the same app server may have the same host and port (corresponding to the Web server HTTP port). The activemqServerName property is used to distinguish them. * Iron out HTTP upgrade handler so that the latch is always count down and the channel context is closed unless the handshake was completed successfully 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 > Fix For: 2.0.0, 1.5.x > > > 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.15#6346)