title: Azure Server error when port appended to host header
body: <p>I'm running an Azure Web App that's meant to accept XML Posts.  When I post to the urls using cURL everything works, however, when using Apache Camel/HTTP the POST results in a 400 error.  When I look at the log files, the only difference is cs-host field.  For the cURL commands the value is just the domain (e.g. azurewebsites.net), however the Apache POST appends port 80 (e.g. azurewebsites.net:80).  I added a rewrite rule that would strip the port from the call (rule details below), but the POST still results in 400 error.  The closest related post I could find was here: <a href="https://stackoverflow.com/questions/34093253/including-port-number-in-http-host-header-causes-service-unavailable-error">Including Port number in HTTP HOST header causes Service Unavailable error</a> but unfortunately it looks like it's related to Netscaler, not Azure Web App, and the resolution didn't provide any detailed guidance..  Thanks for any input!</p>
  
  <p>Here's the rewrite rule:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"&gt;
    &lt;location path="domain" xdt:Locator="Match(path)"&gt;
      &lt;system.webServer&gt;
        &lt;rewrite xdt:Transform="InsertBefore(/configuration/location[(@path='domain')]/system.webServer/*[1])"&gt;
          &lt;rules&gt;
            &lt;rule name="domainrule1" stopProcessing="true"&gt;
              &lt;match url="domain.azurewebsites.net:80(.*)" /&gt;
              &lt;action type="Redirect" url="http://domain.azurewebsites.net/{R:1}" /&gt;
            &lt;/rule&gt;
          &lt;/rules&gt;
        &lt;/rewrite&gt;
      &lt;/system.webServer&gt;
    &lt;/location&gt;
    &lt;location path="~1domain" xdt:Locator="Match(path)"&gt;
      &lt;system.webServer&gt;
        &lt;rewrite&gt;
          &lt;rules&gt;
            &lt;rule name="domainrule2" stopProcessing="true" xdt:Transform="Insert"&gt;
              &lt;match url="domain.azurewebsites.net:80(.*)" /&gt;
              &lt;action type="Redirect" url="http://domain.azurewebsites.net/{R:1}" /&gt;
            &lt;/rule&gt;
          &lt;/rules&gt;
        &lt;/rewrite&gt;
      &lt;/system.webServer&gt;
    &lt;/location&gt;
  &lt;/configuration&gt;
  </code></pre>