Custom Query (2296 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (19 - 21 of 2296)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Ticket Resolution Summary Owner Reporter
#32 fixed expires header not set correctly using '@' format Maxim Dounin time4tea.myopenid.com
Description

If upstream does not send last-modified header, @ style expiry times will be interpreted as (now + time)

(from r1.0.8)

ngx_http_headers_filter_module.c line 266 the bug is that the expires header is not set correctly when using @ and it is the case that it is not set correctly, but you will only see the bug if upstream does not set a last-modified header

 if (conf->expires == NGX_HTTP_EXPIRES_ACCESS
        || r->headers_out.last_modified_time == -1)
    {

its the || condition that causes the problem

confirmed on #nginx by PiotrSikora

#34 fixed Allow rewrites in case of proxy_pass backend is configured as variable somebody cschug.myopenid.com
Description

As a follow up on the discussion on http://forum.nginx.org/read.php?2,215830 I would kindly ask to merge the patch provided by Maxim Dounin into Nginx

# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1317281138 -14400
# Node ID d6a0787307868c06073d92bb39eb2f73acf19d7c
# Parent  29d417d419d946dce33023c71cce0e586ef3547b
Proxy: made proxy_pass with variables more consitent.

If proxy_pass were used with variables and there were no URI component,
nginx always used unparsed URI.  This isn't consistent with "no variables"
case, where e.g. rewrites are applied even if there are no URI component.

Fix is to use same logic in both cases, i.e. only use unparsed URI if
it's valid and request is main one.

diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -738,9 +738,6 @@ ngx_http_proxy_eval(ngx_http_request_t *
             url.uri.len++;
             url.uri.data = p - 1;
         }
-
-    } else {
-        url.uri = r->unparsed_uri;
     }

     ctx->vars.key_start = u->schema;
@@ -808,7 +805,7 @@ ngx_http_proxy_create_key(ngx_http_reque
         return NGX_ERROR;
     }

-    if (plcf->proxy_lengths) {
+    if (plcf->proxy_lengths && ctx->vars.uri.len) {

         *key = ctx->vars.uri;
         u->uri = ctx->vars.uri;
@@ -918,7 +915,7 @@ ngx_http_proxy_create_request(ngx_http_r
     loc_len = 0;
     unparsed_uri = 0;

-    if (plcf->proxy_lengths) {
+    if (plcf->proxy_lengths && ctx->vars.uri.len) {
         uri_len = ctx->vars.uri.len;

     } else if (ctx->vars.uri.len == 0 && r->valid_unparsed_uri && r == r->main)
@@ -1024,7 +1021,7 @@ ngx_http_proxy_create_request(ngx_http_r

     u->uri.data = b->last;

-    if (plcf->proxy_lengths) {
+    if (plcf->proxy_lengths && ctx->vars.uri.len) {
         b->last = ngx_copy(b->last, ctx->vars.uri.data, ctx->vars.uri.len);

     } else if (unparsed_uri) {

This makes Nginx's rewriting behavior consistent with a statically configured proxy_pass backend where rewriting of the URI gets honored. Right now if a backend is configured per variable to allow dynamic DNS lookups (in case the hostname of the backend changes during runtime), any rewriting gets ignored and the unparsed URI gets passed to the backend.

#37 fixed SEGFAULT when testing syntax Maxim Dounin www.google.com/accounts/o8/id?id=AItOawn4-PLPDRvUy9amcGwVzi74Lox5Uiyk928
Description

nginx is segfaulting in src/core/ngx_string.c:253 when running syntax check (-t). It seems to be related to module stub_status

Here is gdb session :

(gdb) break src/core/ngx_string.c:251 Breakpoint 1 at 0x40b6a8: file src/core/ngx_string.c, line 251. (gdb) run -t Starting program: /usr/sbin/nginx -t [...]

Breakpoint 1, ngx_vslprintf (buf=0x685b1e "", last=0xffffffffffffffff <Address 0xffffffffffffffff out of bounds>,

fmt=0x4633d1 "s, %02d %s %4d %02d:%02d:%02d GMT", args=0x7fffffffe370) at src/core/ngx_string.c:252

[...] (gdb) info args buf = 0x685b1e "" last = 0xffffffffffffffff <Address 0xffffffffffffffff out of bounds> fmt = 0x4633d1 "s, %02d %s %4d %02d:%02d:%02d GMT" args = 0x7fffffffe370

(gdb) continue [... 5 breakpoints at the same point, continue anyway]

Breakpoint 1, ngx_vslprintf (buf=0x7fffffffd64f "", last=0x7fffffffddf0 "(", fmt=0x46b74c "s:%ui", args=0x7fffffffddf0)

at src/core/ngx_string.c:252

252 in src/core/ngx_string.c (gdb) continue Continuing.

Program received signal SIGSEGV, Segmentation fault. ngx_vslprintf (buf=0x7fffffffd64f "", last=0x7fffffffddf0 "(", fmt=0x46b74c "s:%ui", args=0x7fffffffddf0) at src/core/ngx_string.c:253 253 in src/core/ngx_string.c

(gdb) info args buf = 0x7fffffffd64f "" last = 0x7fffffffddf0 "(" fmt = 0x46b74c "s:%ui" args = 0x7fffffffddf0


Nginx config file content


http {

ssl on; server {

listen 80; stub_status on;

}

}

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.