diff src/http/ngx_http_upstream.c @ 56:3050baa54a26 NGINX_0_1_28

nginx 0.1.28 *) Bugfix: nginx hogs CPU while proxying the huge files. *) Bugfix: nginx could not be built by gcc 4.0 on Linux.
author Igor Sysoev <http://sysoev.ru>
date Fri, 08 Apr 2005 00:00:00 +0400
parents bcb5fce0b038
children b55cbf18157e
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -1135,7 +1135,7 @@ u_char *
 ngx_http_upstream_log_error(ngx_log_t *log, u_char *buf, size_t len)
 {
     u_char                 *p;
-    ngx_int_t               escape;
+    uintptr_t               escape;
     ngx_http_log_ctx_t     *ctx;
     ngx_http_request_t     *r;
     ngx_http_upstream_t    *u;
@@ -1153,29 +1153,29 @@ ngx_http_upstream_log_error(ngx_log_t *l
                      &r->connection->addr_text,
                      &r->server_name,
                      &r->unparsed_uri,
-                     &u->schema,
+                     &u->schema0,
                      &peer->peers->peer[peer->cur_peer].name,
                      peer->peers->peer[peer->cur_peer].uri_separator,
-                     &u->uri);
+                     &u->uri0);
     len -= p - buf;
     buf = p;
 
     if (r->quoted_uri) {
-        escape = 2 * ngx_escape_uri(NULL, r->uri.data + u->location->len,
-                                    r->uri.len - u->location->len,
+        escape = 2 * ngx_escape_uri(NULL, r->uri.data + u->location0->len,
+                                    r->uri.len - u->location0->len,
                                     NGX_ESCAPE_URI);
     } else {
         escape = 0;
     }
 
     if (escape) {
-        if (len >= r->uri.len - u->location->len + escape) {
+        if (len >= r->uri.len - u->location0->len + escape) {
 
-            ngx_escape_uri(buf, r->uri.data + u->location->len,
-                           r->uri.len - u->location->len, NGX_ESCAPE_URI);
+            ngx_escape_uri(buf, r->uri.data + u->location0->len,
+                           r->uri.len - u->location0->len, NGX_ESCAPE_URI);
 
-            buf += r->uri.len - u->location->len + escape;
-            len -= r->uri.len - u->location->len + escape;
+            buf += r->uri.len - u->location0->len + escape;
+            len -= r->uri.len - u->location0->len + escape;
 
             if (r->args.len) {
                 p = ngx_snprintf(buf, len, "?%V", &r->args);
@@ -1186,19 +1186,19 @@ ngx_http_upstream_log_error(ngx_log_t *l
             return ngx_http_log_error_info(r, buf, len);
         }
 
-        p = ngx_palloc(r->pool, r->uri.len - u->location->len + escape);
+        p = ngx_palloc(r->pool, r->uri.len - u->location0->len + escape);
         if (p == NULL) {
             return buf;
         }
 
-        ngx_escape_uri(p, r->uri.data + u->location->len,
-                       r->uri.len - u->location->len, NGX_ESCAPE_URI);
+        ngx_escape_uri(p, r->uri.data + u->location0->len,
+                       r->uri.len - u->location0->len, NGX_ESCAPE_URI);
 
-        p = ngx_cpymem(buf, p, r->uri.len - u->location->len + escape);
+        p = ngx_cpymem(buf, p, r->uri.len - u->location0->len + escape);
 
     } else {
-        p = ngx_cpymem(buf, r->uri.data + u->location->len,
-                       r->uri.len - u->location->len);
+        p = ngx_cpymem(buf, r->uri.data + u->location0->len,
+                       r->uri.len - u->location0->len);
     }
 
     len -= p - buf;