Changes between Initial Version and Version 1 of Ticket #752


Ignore:
Timestamp:
04/23/15 15:14:12 (10 years ago)
Author:
Maxim Dounin
Comment:

Thanks for filing the ticket. I've translated it to English (and slightly modified to add some more details).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #752

    • Property Keywords try_files added
    • Property Status newaccepted
  • Ticket #752 – Description

    initial v1  
    1 При использовании subrequest в сочетании с try_files с proxy-хэндлером наблюдается неоднозначное поведение nginx.
     1When using subrequests with try_files the following behaviour is observed.
     2
    23{{{
    34   server {
     
    2425
    2526
    26 При наличии файла /tmp/tres, на запрос
     27Assuming /tmp/tres exists, a request to
    2728
    2829http://127.0.0.1:8080/uno
    2930
    30 nginx возвращает в теле **"uno  tres "**, а  не **"uno  duo "** или  **"tres tres "**.
     31returns **"uno  tres "**, not **"uno  duo "** or  **"tres tres "**.
    3132
    32 Т.о. URI основного запроса без изменений передается бэкенду (proxy_pass без URI).
    33 В подзапросе же URI заведомо изменён, и proxy_pass использует нормализованный URI запроса целиком, т.е. "/tres".
     33I.e., main request assumes that the request URI is unmodified and passes original request URI, "/uno".
     34But in a subrequest the URI is modified and nginx uses modified URI, "/tres".
     35
     36This 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
     41See [[http://mailman.nginx.org/pipermail/nginx-ru/2015-April/055769.html|this thread]] (in Russian) for additional details.