summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nginx/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
authorrobert <robert@openbsd.org>2012-07-07 16:01:48 +0000
committerrobert <robert@openbsd.org>2012-07-07 16:01:48 +0000
commit804b71a0609acb5f92f9dcddca7d9200130484d9 (patch)
treef00c8fb2d42c998ec27b6b9b0c899f878c118d15 /usr.sbin/nginx/src/http/ngx_http_upstream.c
parentadd /var/www/cache for nginx to store some data (diff)
downloadwireguard-openbsd-804b71a0609acb5f92f9dcddca7d9200130484d9.tar.xz
wireguard-openbsd-804b71a0609acb5f92f9dcddca7d9200130484d9.zip
update to 1.2.2 and start using /var/www/cache instead of /var/www/tmp
Diffstat (limited to 'usr.sbin/nginx/src/http/ngx_http_upstream.c')
-rw-r--r--usr.sbin/nginx/src/http/ngx_http_upstream.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/nginx/src/http/ngx_http_upstream.c b/usr.sbin/nginx/src/http/ngx_http_upstream.c
index 70a4e166856..3730a20262c 100644
--- a/usr.sbin/nginx/src/http/ngx_http_upstream.c
+++ b/usr.sbin/nginx/src/http/ngx_http_upstream.c
@@ -3677,6 +3677,7 @@ static ngx_int_t
ngx_http_upstream_rewrite_set_cookie(ngx_http_request_t *r, ngx_table_elt_t *h,
ngx_uint_t offset)
{
+ ngx_int_t rc;
ngx_table_elt_t *ho;
ho = ngx_list_push(&r->headers_out.headers);
@@ -3687,7 +3688,20 @@ ngx_http_upstream_rewrite_set_cookie(ngx_http_request_t *r, ngx_table_elt_t *h,
*ho = *h;
if (r->upstream->rewrite_cookie) {
- return r->upstream->rewrite_cookie(r, ho);
+ rc = r->upstream->rewrite_cookie(r, ho);
+
+ if (rc == NGX_DECLINED) {
+ return NGX_OK;
+ }
+
+#if (NGX_DEBUG)
+ if (rc == NGX_OK) {
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "rewritten cookie: \"%V\"", &ho->value);
+ }
+#endif
+
+ return rc;
}
return NGX_OK;