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 AC690200BB3 for ; Wed, 2 Nov 2016 14:57:18 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AB0D9160AFB; Wed, 2 Nov 2016 13:57:18 +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 F2A38160AEA for ; Wed, 2 Nov 2016 14:57:17 +0100 (CET) Received: (qmail 83638 invoked by uid 500); 2 Nov 2016 13:57:17 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 83626 invoked by uid 99); 2 Nov 2016 13:57:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2016 13:57:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id F1661180424 for ; Wed, 2 Nov 2016 13:57:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.02 X-Spam-Level: X-Spam-Status: No, score=-0.02 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id aHWlUHxsIowj for ; Wed, 2 Nov 2016 13:57:14 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D85555FC38 for ; Wed, 2 Nov 2016 13:57:13 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id n67so39220083wme.1 for ; Wed, 02 Nov 2016 06:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=kb7mfP9WLYCPy21kdEMNFTavbdLiUQ5SjziQ49vRF9c=; b=PFh0hFmX5rScGIRznC5Grj9Zn8sfiaNtDcfGfAZv3QxiTkzqWMPoIUMa4t0it1FN5e 4FMrbhxRXgxo3XRzfjTpbIDSi4774fNaDls06HoNzUNzQ2HEiYjwMf6mGaDtWHZ4UnkP 11R+lpSeGNPD6YyMBFYdzM4tvqnchVk126Zn2onyeMkRLWnY/CjF+vtCbAb7+GEpn9iZ UAbasfNg3gWi+BHY8irROlIOPR08zjEmJLNgdCdshFCXTcIaTlRCOj/gdMTt4IQia1zU rB3INqLqR/+cbdBiP/Zzf64oLw6DpZ+92RyJmz0UQ/JCYzdKhSFSYuviXzJL0hymtvnO BVXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=kb7mfP9WLYCPy21kdEMNFTavbdLiUQ5SjziQ49vRF9c=; b=Ch0SQqggehFeF9ua+6OmUUBg9DGaMORFw9xFj8QXGxO7gQA++z741u22w845h9MIV2 9GB/qref1etm5+GBoSgkd0Kx/fDcKsoiMfdkYBbPlDPt8ZuSjvgfTkaZBRO9iOvopn+V C9t85UjhenMYoWnfisWoeIZ/o0p2w8X3CKHxB6DrrjBwD4NFXGLQY9kuZW0ePHC8/UhL /WoZdSH5oGbhDniXW6oo/vdcG7hkIsKsrGd9MxE3e+S+F54Yx4lx36/Z6rZfBueQP4pc kDWzEfdQL0R5AhctNhm54rG+qnbW9Z+m3bpzIT5IZFPoyFN8CQUtUPWDn+bRnHweduq8 DDQw== X-Gm-Message-State: ABUngvfxeJYgXhIQgfcyv2HBuHt1IcFdzvg7wv0fNbmFDw1f0MedHwXckUyHCeJ6JjWTSBKWfD9+WlYIMaLS+g== X-Received: by 10.28.214.84 with SMTP id n81mr2993666wmg.120.1478095031591; Wed, 02 Nov 2016 06:57:11 -0700 (PDT) MIME-Version: 1.0 Sender: koperdraat.jk@gmail.com Received: by 10.80.178.230 with HTTP; Wed, 2 Nov 2016 06:57:10 -0700 (PDT) From: Jonas Koperdraat Date: Wed, 2 Nov 2016 14:57:10 +0100 X-Google-Sender-Auth: qvrANTxklQqxy_pFa9fz0y-xy-I Message-ID: Subject: 'host' configuration param not used by servlet To: users@camel.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Wed, 02 Nov 2016 13:57:18 -0000 I have a REST API for which I am exposing a swagger definitiion using camel-swagger-java. The application is deployed behind a proxy, because of which I need to change host used in the generated swagger documentation. Currently, the internal hostname of the actual machine is being used, based on the host in the request. Because I want to make the swagger api public, I need this to be the public hostname, that which is configured in the proxy. According to the documentation of camel-swagger-java (http://camel.apache.org/swagger-java.html), the 'host' option allows me to do just that; "To setup the hostname." However, this seems not to be working. I have looked ad the code, and it seems to me, that there is something wrong with the implementation of the RestSwaggerServlet: In org.apache.camel.swagger.servlet.RestSwaggerServlet, there's the method doGet, which is called for each request. The first time this is called, 'initBaseAndApiPaths' is called to do some initialization. Debugging shows that when entering this method, the 'host' configuration is propertly set to the value specified in my web.xml file. However, the logic in this method is such that the host will always be overridden with the host of the request url, thereby rendering the 'host' configuration parameter useless. It seems to me that this is a bug, but I might be mistaken, Is anyone else familiar with this problem and aware of a solution/workaround? Kind regards, Jonas