# Slim v2.6 - Request getPath with request-target in absolute-form

**URL:** <https://discourse.slimframework.com/t/slim-v2-6-request-getpath-with-request-target-in-absolute-form/524>\
**Category:** Questions\
**Created:** [July 18, 2016, 12:52pm UTC](https://discourse.slimframework.com/t/slim-v2-6-request-getpath-with-request-target-in-absolute-form/524 "2016-07-18T12:52:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmto](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jmto](https://discourse.slimframework.com/u/jmto)\
**Post date:** [July 18, 2016, 12:52pm UTC](https://discourse.slimframework.com/t/slim-v2-6-request-getpath-with-request-target-in-absolute-form/524/1 "2016-07-18T12:52:32Z")

</div>

Hi,

What I’ve understood from the RFC, [https://tools.ietf.org/html/rfc7230#section-5.3.2](https://tools.ietf.org/html/rfc7230#section-5.3.2)  
"To allow for transition to the absolute-form for all requests in some  
future version of HTTP, a server MUST accept the absolute-form in  
requests, even though HTTP/1.1 clients will only send them in  
requests to proxies."

One should support requests like:  
`GET http://domain/path HTTP/1.1`  
But now if I make a request like that to Slim framework, request()-\>getPath() will return:  
/[http://domain/path](http://domain/path)

Which then does not do the same effect than requesting:  
`GET /path HTTP/1.1`  
because then request()-\>getPath() will return /path as expected.

I’ve done workaround for this with own:  
`public function getRequestPath() { return '/' . parse_url(ltrim($this->request()->getPath(), '/'), PHP_URL_PATH); }`

So question is, am I reading the RFC right and should Slim’s getPath return the path correctly also when the request is done with absolute-form?
