comparison src/http/modules/perl/nginx.xs @ 382:984bb0b1399b NGINX_0_7_3

nginx 0.7.3 *) Change: the "rss" extension MIME type has been changed to "application/rss+xml". *) Change: now the "gzip_vary" directive turned on issues a "Vary: Accept-Encoding" header line for uncompressed responses too. *) Feature: now the "rewrite" directive does a redirect automatically if the "https://" protocol is used. *) Bugfix: the "proxy_pass" directive did not work with the HTTPS protocol; the bug had appeared in 0.6.9.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Jun 2008 00:00:00 +0400
parents babd3d9efb62
children 12defd37f578
comparison
equal deleted inserted replaced
381:23d1555141d9 382:984bb0b1399b
46 "perl sv2str: %08XD \"%V\"", sv->sv_flags, s); 46 "perl sv2str: %08XD \"%V\"", sv->sv_flags, s);
47 47
48 return NGX_OK; 48 return NGX_OK;
49 } 49 }
50 50
51 s->data = ngx_palloc(r->pool, len); 51 s->data = ngx_pnalloc(r->pool, len);
52 if (s->data == NULL) { 52 if (s->data == NULL) {
53 return NGX_ERROR; 53 return NGX_ERROR;
54 } 54 }
55 55
56 ngx_memcpy(s->data, p, len); 56 ngx_memcpy(s->data, p, len);
240 240
241 p = (u_char *) SvPV(key, len); 241 p = (u_char *) SvPV(key, len);
242 242
243 /* look up hashed headers */ 243 /* look up hashed headers */
244 244
245 lowcase_key = ngx_palloc(r->pool, len); 245 lowcase_key = ngx_pnalloc(r->pool, len);
246 if (lowcase_key == NULL) { 246 if (lowcase_key == NULL) {
247 XSRETURN_UNDEF; 247 XSRETURN_UNDEF;
248 } 248 }
249 249
250 hash = 0; 250 hash = 0;
291 291
292 for (i = 0; i < n; i++) { 292 for (i = 0; i < n; i++) {
293 size += ph[i]->value.len + sizeof("; ") - 1; 293 size += ph[i]->value.len + sizeof("; ") - 1;
294 } 294 }
295 295
296 cookie = ngx_palloc(r->pool, size); 296 cookie = ngx_pnalloc(r->pool, size);
297 if (cookie == NULL) { 297 if (cookie == NULL) {
298 XSRETURN_UNDEF; 298 XSRETURN_UNDEF;
299 } 299 }
300 300
301 p = cookie; 301 p = cookie;
767 767
768 text = ST(1); 768 text = ST(1);
769 769
770 src = (u_char *) SvPV(text, len); 770 src = (u_char *) SvPV(text, len);
771 771
772 p = ngx_palloc(r->pool, len + 1); 772 p = ngx_pnalloc(r->pool, len + 1);
773 if (p == NULL) { 773 if (p == NULL) {
774 XSRETURN_UNDEF; 774 XSRETURN_UNDEF;
775 } 775 }
776 776
777 dst = p; 777 dst = p;
824 } 824 }
825 } 825 }
826 826
827 p = (u_char *) SvPV(name, len); 827 p = (u_char *) SvPV(name, len);
828 828
829 lowcase = ngx_palloc(r->pool, len); 829 lowcase = ngx_pnalloc(r->pool, len);
830 if (lowcase == NULL) { 830 if (lowcase == NULL) {
831 XSRETURN_UNDEF; 831 XSRETURN_UNDEF;
832 } 832 }
833 833
834 hash = 0; 834 hash = 0;