comparison src/http/modules/perl/nginx.xs @ 180:4cd3e70c4d60 NGINX_0_3_37

nginx 0.3.37 *) 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 <http://sysoev.ru>
date Fri, 07 Apr 2006 00:00:00 +0400
parents 87699398f955
children 13710a1813ad
comparison
equal deleted inserted replaced
179:654cbdc0401d 180:4cd3e70c4d60
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