comparison src/http/modules/perl/nginx.xs @ 4255:edc216059175 stable-1.0

Merging r4189, r4197: Perl related fixes: *) Handling of Content-Encoding set from perl. This fixes double gzipping in case of gzip filter being enabled while perl returns already gzipped response. *) Fixed macro name.
author Igor Sysoev <igor@sysoev.ru>
date Tue, 01 Nov 2011 14:15:42 +0000
parents 8cd7594916ec
children 4919fb357a5d
comparison
equal deleted inserted replaced
4254:35861ba428d1 4255:edc216059175
472 { 472 {
473 r->headers_out.content_length_n = (off_t) SvIV(value); 473 r->headers_out.content_length_n = (off_t) SvIV(value);
474 r->headers_out.content_length = header; 474 r->headers_out.content_length = header;
475 } 475 }
476 476
477 if (header->key.len == sizeof("Content-Encoding") - 1
478 && ngx_strncasecmp(header->key.data, "Content-Encoding",
479 sizeof("Content-Encoding") - 1) == 0)
480 {
481 r->headers_out.content_encoding = header;
482 }
483
477 484
478 void 485 void
479 filename(r) 486 filename(r)
480 CODE: 487 CODE:
481 488
834 hash = ngx_hash_strlow(lowcase, p, len); 841 hash = ngx_hash_strlow(lowcase, p, len);
835 842
836 var.len = len; 843 var.len = len;
837 var.data = lowcase; 844 var.data = lowcase;
838 845
839 #if (NGX_LOG_DEBUG) 846 #if (NGX_DEBUG)
840 847
841 if (value) { 848 if (value) {
842 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 849 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
843 "perl variable: \"%V\"=\"%V\"", &var, &val); 850 "perl variable: \"%V\"=\"%V\"", &var, &val);
844 } else { 851 } else {