title: AbsoluteURI support in Play Framework 2.1
body: <p>As stated here:
  <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html" rel="noreferrer">http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html</a></p>
  
  <blockquote>
    <p>To allow for transition to absoluteURIs in all requests in future versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI form in requests, even though HTTP/1.1 clients will only generate them in requests to proxies. </p>
  </blockquote>
  
  <p>I have client which sends POST-requests to my play-2.1.1 server. He sends it this way:</p>
  
  <pre><code>POST http://172.16.1.227:9000/A8%3aF9%3a4B%3a20%3a89%3a40/1089820966/ HTTP/1.1
  Content-Length: 473
  Content-Type: application/json
  Date: Thu, 25 Apr 2013 15:44:43 GMT
  Host: 172.16.1.227:9000
  User-Agent: my-client
  
  ...some data...
  </code></pre>
  
  <p>All requests are rejected with "Action not found" error. The very same request which I send using curl is just fine and the only difference between them is curl send it with relative URI:</p>
  
  <pre><code>POST /A8%3aF9%3a4B%3a20%3a89%3a40/1089820966/ HTTP/1.1
  Accept: */*
  Content-Length: 593
  Content-Type: application/json
  Host: 172.16.1.227:9000
  User-Agent: curl/7.30.0
  </code></pre>
  
  <p>I created the following simple workaround in Global.scala:</p>
  
  <pre><code>override def onRouteRequest(request: RequestHeader): Option[Handler] = {
    if (request.path.startsWith("http://")) {
      super.onRouteRequest(request.copy(
        path = request.path.replace("http://"+request.host, "")
      ))
    } else super.onRouteRequest(request)
  }
  </code></pre>
  
  <p>And with this workaround all requests from my client are handled correctly. </p>
  
  <p>So, is there more straightforward way to do it in Play Framework or thats the only way?</p>