Changes between Initial Version and Version 1 of Ticket #752
- Timestamp:
- 04/23/15 15:14:12 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #752
- Property Keywords try_files added
- Property Status new → accepted
-
Ticket #752 – Description
initial v1 1 При использовании subrequest в сочетании с try_files с proxy-хэндлером наблюдается неоднозначное поведение nginx. 1 When using subrequests with try_files the following behaviour is observed. 2 2 3 {{{ 3 4 server { … … 24 25 25 26 26 При наличии файла /tmp/tres, на запрос 27 Assuming /tmp/tres exists, a request to 27 28 28 29 http://127.0.0.1:8080/uno 29 30 30 nginx возвращает в теле **"uno tres "**, а не **"uno duo "** или**"tres tres "**.31 returns **"uno tres "**, not **"uno duo "** or **"tres tres "**. 31 32 32 Т.о. URI основного запроса без изменений передается бэкенду (proxy_pass без URI). 33 В подзапросе же URI заведомо изменён, и proxy_pass использует нормализованный URI запроса целиком, т.е. "/tres". 33 I.e., main request assumes that the request URI is unmodified and passes original request URI, "/uno". 34 But in a subrequest the URI is modified and nginx uses modified URI, "/tres". 35 36 This is believed to be a bug, and one of the following should be done: 37 38 - `try_files` should reset the `r->valid_unparsed_uri` flag if it modifies the URI; 39 - or `try_files` should not modify the URI at all. 40 41 See [[http://mailman.nginx.org/pipermail/nginx-ru/2015-April/055769.html|this thread]] (in Russian) for additional details.