I cannot find it anywhere, nor in the source code of Apache nor on any page references for this happening, but somehow Apache normalizes URIs
from
/with/space
into
as seem from a django application routed via wsgi.
When using gunicorn (also wsgi) or django's runserver, this normalization does not happen and the code returns 404. With Apache, the space before a slash is removed. I verified via a middleware which shows different results on Apache and Gunicorn/Runserver.
Apache does not normalize spaces anywhere else but right before a slash. Every other space is kept as is.
The RFC 3968 does not say anything about this under the normalization topic (ref).
The Apache source code for ap_normalize_path does not have anything regarding space before slash normalization. It only seems to normalize multiple slashes and dots.
It might be possible mod_wsgi is the culprit here, but I also did not find anything relevant.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744650285a4585858.html
评论列表(0条)