title: Apache mod_proxy url encoding
body: <p>I have a REST service that accepts parameters in a form /{parameter}</p>
  
  <p>Also there is Apache2 that forwards requests to the websevice</p>
  
  <pre><code>&lt;VirtualHost *:9091&gt;
    AllowEncodedSlashes NoDecode
    LogLevel debug
    ProxyPass /webservice balancer://api/webservice
  
    &lt;Proxy balancer://api&gt;
       BalancerMember http://localhost:8030
    &lt;/Proxy&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Parameters may contain encoded characters, like %2f (/)</p>
  
  <p>The problem is that Apache encodes these characters again, and Webservice receives %252F instead of %2F</p>
  
  <pre><code>[Mon Oct 15 13:59:24 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //api/webservice/Interface GigabitEthernet1%2F0%2F2
  [Mon Oct 15 13:59:24 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://api) worker (http://localhost:8030) rewritten to http://localhost:8030/Interface%20GigabitEthernet1%252F0%252F2%20Utilization
  </code></pre>
  
  <p>If I request the webservice directtly, Tomcat/Jetty handles it find and service receives correct parameter.</p>