Mercurial > hg > nginx-ranges
comparison src/http/modules/perl/nginx.xs @ 635:e67b227c8dbb default tip
Merge with current.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 25 Apr 2011 04:07:55 +0400 |
parents | 8214eaef3530 |
children |
comparison
equal
deleted
inserted
replaced
578:f3a9e57d2e17 | 635:e67b227c8dbb |
---|---|
465 if (ngx_http_perl_sv2str(aTHX_ r, &header->value, value) != NGX_OK) { | 465 if (ngx_http_perl_sv2str(aTHX_ r, &header->value, value) != NGX_OK) { |
466 XSRETURN_EMPTY; | 466 XSRETURN_EMPTY; |
467 } | 467 } |
468 | 468 |
469 if (header->key.len == sizeof("Content-Length") - 1 | 469 if (header->key.len == sizeof("Content-Length") - 1 |
470 && ngx_strncasecmp(header->key.data, "Content-Length", | 470 && ngx_strncasecmp(header->key.data, (u_char *) "Content-Length", |
471 sizeof("Content-Length") - 1) == 0) | 471 sizeof("Content-Length") - 1) == 0) |
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 } |
640 path.data = ngx_pnalloc(r->pool, path.len + 1); | 640 path.data = ngx_pnalloc(r->pool, path.len + 1); |
641 if (path.data == NULL) { | 641 if (path.data == NULL) { |
642 XSRETURN_EMPTY; | 642 XSRETURN_EMPTY; |
643 } | 643 } |
644 | 644 |
645 (void) ngx_cpystrn(path.data, filename, path.len + 1); | 645 (void) ngx_cpystrn(path.data, (u_char *) filename, path.len + 1); |
646 | 646 |
647 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 647 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
648 | 648 |
649 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); | 649 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); |
650 | 650 |
846 "perl variable: \"%V\"", &var); | 846 "perl variable: \"%V\"", &var); |
847 } | 847 } |
848 | 848 |
849 #endif | 849 #endif |
850 | 850 |
851 vv = ngx_http_get_variable(r, &var, hash, 1); | 851 vv = ngx_http_get_variable(r, &var, hash); |
852 if (vv == NULL) { | 852 if (vv == NULL) { |
853 XSRETURN_UNDEF; | 853 XSRETURN_UNDEF; |
854 } | 854 } |
855 | 855 |
856 if (vv->not_found) { | 856 if (vv->not_found) { |