Mercurial > hg > nginx-quic
annotate src/stream/ngx_stream_ssl_module.h @ 6227:bd55d75a1410
Fixed wrong URI after try_files in nested location (ticket #97).
The following configuration with alias, nested location and try_files
resulted in wrong file being used. Request "/foo/test.gif" tried to
use "/tmp//foo/test.gif" instead of "/tmp/test.gif":
location /foo/ {
alias /tmp/;
location ~ gif {
try_files $uri =405;
}
}
Additionally, rev. c985d90a8d1f introduced a regression if
the "/tmp//foo/test.gif" file was found (ticket #768). Resulting URI
was set to "gif?/foo/test.gif", as the code used clcf->name of current
location ("location ~ gif") instead of parent one ("location /foo/").
Fix is to use r->uri instead of clcf->name in all cases in the
ngx_http_core_try_files_phase() function. It is expected to be
already matched and identical to the clcf->name of the right
location.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sun, 16 Aug 2015 10:51:34 +0300 |
parents | 61d7ae76647d |
children | 51e1f047d15d |
rev | line source |
---|---|
6115 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 * Copyright (C) Nginx, Inc. | |
5 */ | |
6 | |
7 | |
8 #ifndef _NGX_STREAM_SSL_H_INCLUDED_ | |
9 #define _NGX_STREAM_SSL_H_INCLUDED_ | |
10 | |
11 | |
12 #include <ngx_config.h> | |
13 #include <ngx_core.h> | |
14 #include <ngx_stream.h> | |
15 | |
16 | |
17 typedef struct { | |
18 ngx_msec_t handshake_timeout; | |
19 | |
20 ngx_flag_t prefer_server_ciphers; | |
21 | |
22 ngx_ssl_t ssl; | |
23 | |
24 ngx_uint_t protocols; | |
25 | |
26 ssize_t builtin_session_cache; | |
27 | |
28 time_t session_timeout; | |
29 | |
30 ngx_str_t certificate; | |
31 ngx_str_t certificate_key; | |
32 ngx_str_t dhparam; | |
33 ngx_str_t ecdh_curve; | |
34 | |
35 ngx_str_t ciphers; | |
36 | |
37 ngx_array_t *passwords; | |
38 | |
39 ngx_shm_zone_t *shm_zone; | |
40 | |
41 ngx_flag_t session_tickets; | |
42 ngx_array_t *session_ticket_keys; | |
43 } ngx_stream_ssl_conf_t; | |
44 | |
45 | |
46 extern ngx_module_t ngx_stream_ssl_module; | |
47 | |
48 | |
49 #endif /* _NGX_STREAM_SSL_H_INCLUDED_ */ |