Skip to content

Commit

Permalink
www/nginx-devel: fix build for third-party http_redis module
Browse files Browse the repository at this point in the history
Bump PORTREVISION.
  • Loading branch information
osokin committed Jul 11, 2022
1 parent 9245563 commit d9c9555
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
3 changes: 1 addition & 2 deletions www/nginx-devel/Makefile
Expand Up @@ -2,7 +2,7 @@

PORTNAME?= nginx
PORTVERSION= 1.23.0
PORTREVISION= 9
PORTREVISION= 10
CATEGORIES= www
MASTER_SITES= https://nginx.org/download/ \
LOCAL/osa
Expand Down Expand Up @@ -246,7 +246,6 @@ NJS_CONFIGURE_ARGS= --no-pcre2
.endif

.if ${PORT_OPTIONS:MCLOJURE} || \
${PORT_OPTIONS:MHTTP_REDIS} || \
${PORT_OPTIONS:MHTTP_UPLOAD_PROGRESS}
IGNORE= a patch requires
.endif
Expand Down
1 change: 1 addition & 0 deletions www/nginx-devel/Makefile.extmod
Expand Up @@ -163,6 +163,7 @@ HTTP_PUSH_STREAM_VARS= DSO_EXTMODS+=pushstream
HTTP_REDIS_MASTER_SITES= LOCAL/osa:redis
HTTP_REDIS_DISTFILES= ngx_http_redis-0.3.9.tar.gz:redis
HTTP_REDIS_VARS= DSO_EXTDIRS+=ngx_http_redis-0.3.9
HTTP_REDIS_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-ngx_http_redis_module.c

HTTP_SLICE_AHEAD_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_http_modules_ngx_http_slice_read_ahead.c

Expand Down
34 changes: 34 additions & 0 deletions www/nginx-devel/files/extra-patch-ngx_http_redis_module.c
@@ -0,0 +1,34 @@
--- ../ngx_http_redis-0.3.9/ngx_http_redis_module.c.orig 2022-07-10 22:10:19.031893000 -0400
+++ ../ngx_http_redis-0.3.9/ngx_http_redis_module.c 2022-07-10 22:09:41.271731000 -0400
@@ -562,7 +562,7 @@
/* if defined gzip_flag... */
if (rlcf->gzip_flag) {
/* hash init */
- h = ngx_list_push(&r->upstream->headers_in.headers);
+ h = ngx_list_push(&r->headers_out.headers);
if (h == NULL) {
return NGX_ERROR;
}
@@ -571,19 +571,11 @@
* add Content-Encoding header for future gunzipping
* with ngx_http_gunzip_filter module
*/
- h->hash = ngx_hash(ngx_hash(ngx_hash(ngx_hash(
- ngx_hash(ngx_hash(ngx_hash(
- ngx_hash(ngx_hash(ngx_hash(
- ngx_hash(ngx_hash(ngx_hash(
- ngx_hash(ngx_hash('c', 'o'), 'n'), 't'), 'e'),
- 'n'), 't'), '-'), 'e'), 'n'), 'c'), 'o'),
- 'd'), 'i'), 'n'), 'g');
+ h->hash = 1;
+ h->next = NULL;
ngx_str_set(&h->key, "Content-Encoding");
ngx_str_set(&h->value, "gzip");
- h->lowcase_key = (u_char*) "content-encoding";
-#if (NGX_HTTP_GZIP)
- u->headers_in.content_encoding = h;
-#endif
+ r->headers_out.content_encoding = h;
}

/* try to find end of string */

0 comments on commit d9c9555

Please sign in to comment.