Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
RequestFactory, REQUEST_URI and absolute URLs #91
Recently I installed this addon to Google Chrome:
its purpose is something like etc/hosts file with one single exception. If used, it sends HTTP requests like:
which seems to be valid according to https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html
But Nette shows "no routes" and gives me 404.
Because RequestFactory.php where $_SEVER['REQUEST_URI'] is parsed cannot handle absolute URLs. I quick-fixed this simply by modifying urlFilters from:
and it works, but I'm not sure if this is the best way to "fix" this.
According to RFC 7230 ch. 5.3 - Request Target, this is not valid.
Yes, you are right. In the most common used scenario it should be the absolute path, but in section 5.3.2 there is also absolute form = absolute-URI for proxies (and maybe the chrome add-on acts as a proxy - but I'm still not sure). And furthermore there is this sentence:
So I would say that Nette should handle these requests as well. What do you think? Or do you think that I should rather sent a bugreport to that chrome add-on vendor?