Mercurial > hg > nginx
comparison src/http/modules/perl/nginx.xs @ 681:7e24168b0853 release-0.4.0
nginx-0.4.0-RELEASE import
*) Change in internal API: the HTTP modules initialization was moved
from the init module phase to the HTTP postconfiguration phase.
*) Change: now the request body is not read beforehand for the
ngx_http_perl_module: it's required to start the reading using the
$r->has_request_body method.
*) Feature: the ngx_http_perl_module supports the DECLINED return code.
*) Feature: the ngx_http_dav_module supports the incoming "Date" header
line for the PUT method.
*) Feature: the "ssi" directive is available inside the "if" block.
*) Bugfix: a segmentation fault occurred if there was an "index"
directive with variables and the first index name was without
variables; the bug had appeared in 0.1.29.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 30 Aug 2006 10:39:17 +0000 |
parents | b80f94fa2197 |
children | 63a08390a8a2 |
comparison
equal
deleted
inserted
replaced
680:63a949f7ed4f | 681:7e24168b0853 |
---|---|
327 | 327 |
328 ST(0) = TARG; | 328 ST(0) = TARG; |
329 | 329 |
330 | 330 |
331 void | 331 void |
332 has_request_body(r, next) | |
333 CODE: | |
334 | |
335 dXSTARG; | |
336 ngx_http_request_t *r; | |
337 SV *next; | |
338 ngx_http_perl_ctx_t *ctx; | |
339 | |
340 ngx_http_perl_set_request(r); | |
341 | |
342 if (r->headers_in.content_length_n <= 0) { | |
343 XSRETURN_UNDEF; | |
344 } | |
345 | |
346 next = ST(1); | |
347 | |
348 ctx = ngx_http_get_module_ctx(r, ngx_http_perl_module); | |
349 ctx->next = next; | |
350 | |
351 r->request_body_in_single_buf = 1; | |
352 r->request_body_in_persistent_file = 1; | |
353 r->request_body_delete_incomplete_file = 1; | |
354 | |
355 if (r->request_body_in_file_only) { | |
356 r->request_body_file_log_level = 0; | |
357 } | |
358 | |
359 ngx_http_read_client_request_body(r, ngx_http_perl_handle_request); | |
360 | |
361 sv_upgrade(TARG, SVt_IV); | |
362 sv_setiv(TARG, 1); | |
363 | |
364 ST(0) = TARG; | |
365 | |
366 | |
367 void | |
332 request_body(r) | 368 request_body(r) |
333 CODE: | 369 CODE: |
334 | 370 |
335 dXSTARG; | 371 dXSTARG; |
336 ngx_http_request_t *r; | 372 ngx_http_request_t *r; |