Mercurial > hg > nginx
comparison src/http/modules/perl/nginx.xs @ 909:f01e6664f9be
fix $r->has_request_body()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 12 Dec 2006 20:57:48 +0000 |
parents | 424636f52f44 |
children | 918e19c51a65 |
comparison
equal
deleted
inserted
replaced
908:82adc19b4b4d | 909:f01e6664f9be |
---|---|
332 has_request_body(r, next) | 332 has_request_body(r, next) |
333 CODE: | 333 CODE: |
334 | 334 |
335 dXSTARG; | 335 dXSTARG; |
336 ngx_http_request_t *r; | 336 ngx_http_request_t *r; |
337 SV *next; | |
338 ngx_http_perl_ctx_t *ctx; | 337 ngx_http_perl_ctx_t *ctx; |
339 | 338 |
340 ngx_http_perl_set_request(r); | 339 ngx_http_perl_set_request(r); |
341 | 340 |
342 if (r->headers_in.content_length_n <= 0) { | 341 if (r->headers_in.content_length_n <= 0) { |
343 XSRETURN_UNDEF; | 342 XSRETURN_UNDEF; |
344 } | 343 } |
345 | 344 |
346 next = ST(1); | |
347 | |
348 ctx = ngx_http_get_module_ctx(r, ngx_http_perl_module); | 345 ctx = ngx_http_get_module_ctx(r, ngx_http_perl_module); |
349 ctx->next = next; | 346 ctx->next = SvRV(ST(1)); |
350 | 347 |
351 r->request_body_in_single_buf = 1; | 348 r->request_body_in_single_buf = 1; |
352 r->request_body_in_persistent_file = 1; | 349 r->request_body_in_persistent_file = 1; |
353 r->request_body_delete_incomplete_file = 1; | 350 r->request_body_delete_incomplete_file = 1; |
354 | 351 |