Mercurial > hg > nginx
comparison src/http/modules/perl/nginx.xs @ 631:5d2b8078c1c2 release-0.3.37
nginx-0.3.37-RELEASE import
*) Feature: the "limit_except" directive.
*) Feature: the "if" directive supports the "!~", "!~*", "-f", and
"!-f" operators.
*) Feature: the ngx_http_perl_module supports the $r->request_body
method.
*) Bugfix: in the ngx_http_addition_filter_module.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 07 Apr 2006 14:08:04 +0000 |
parents | 65bf042c0b4f |
children | f971949ffb58 |
comparison
equal
deleted
inserted
replaced
630:375dab4fd227 | 631:5d2b8078c1c2 |
---|---|
259 | 259 |
260 OUTPUT: | 260 OUTPUT: |
261 RETVAL | 261 RETVAL |
262 | 262 |
263 | 263 |
264 SV * | |
265 request_body(r) | |
266 nginx r | |
267 | |
268 PREINIT: | |
269 | |
270 STRLEN len; | |
271 ngx_chain_t *cl; | |
272 | |
273 CODE: | |
274 | |
275 len = 0; | |
276 | |
277 for (cl = r->request_body->bufs; cl; cl = cl->next) { | |
278 if (cl->buf->in_file) { | |
279 XSRETURN_UNDEF; | |
280 } | |
281 | |
282 len += cl->buf->last - cl->buf->pos; | |
283 } | |
284 | |
285 if (len == 0) { | |
286 XSRETURN_UNDEF; | |
287 } | |
288 | |
289 RETVAL = newSV(len); | |
290 | |
291 for (cl = r->request_body->bufs; cl; cl = cl->next) { | |
292 sv_catpvn(RETVAL, cl->buf->pos, cl->buf->last - cl->buf->pos); | |
293 } | |
294 | |
295 OUTPUT: | |
296 RETVAL | |
297 | |
298 | |
264 int | 299 int |
265 header_out(r, key, value) | 300 header_out(r, key, value) |
266 nginx r | 301 nginx r |
267 SV *key | 302 SV *key |
268 SV *value | 303 SV *value |