http icon indicating copy to clipboard operation
http copied to clipboard

RequestFactory: simplified

Open JanTvrdik opened this issue 10 years ago • 6 comments
trafficstars

  • removes URL filters which are very rarely used and could be implemented in userland
  • removes $_SERVER['ORIG_PATH_INFO'] because I don't know any HTTP server used in real-world which would actually require this

JanTvrdik avatar Dec 16 '14 21:12 JanTvrdik

+1 never used it.

hrach avatar Dec 17 '14 14:12 hrach

I also did not manage to find a server where $_SERVER['SCRIPT_NAME'] would be undefined.

JanTvrdik avatar Dec 17 '14 14:12 JanTvrdik

@dg Can I remove the URL filters? They are magical and people who know about them prefer to turn them off anyway – see http://forum.nette.org/cs/9903-ne-kanonizace-lomitek-v-url or https://twitter.com/JanTvrdik/status/542389794085404673 Or does it fall into the same category as binary mode?

JanTvrdik avatar Dec 18 '14 22:12 JanTvrdik

ad $_SERVER['ORIG_PATH_INFO'] & $_SERVER['SCRIPT_NAME']: detection is magic. See this versus this. Currently it somehow works and it is better to not touch it ;-)

ad filters: their problem is that they do not work with canonicalization… Filters are not used because nobody knows about them, they are hard to set, but they are useful. For example, they fix bad url parsers (like this), so it would be better to figure out how to solve the canonicalization.

dg avatar Dec 20 '14 23:12 dg

Partially merged by 37971f00a38ec07615633b80d864bbbd9c350bb6

dg avatar Dec 27 '14 00:12 dg

ad filters: I'm aware of what they can do, I'm just saying that nobody is using them for that. Even your websites don't use them. Wouldn't it be better to handle those use-cases in routing instead of RequestFactory? Or not handle them at all?

JanTvrdik avatar Dec 27 '14 05:12 JanTvrdik