From f10789965e08d2e7acf12e26a217767f4a011d41 Mon Sep 17 00:00:00 2001 From: "roberto@natty32" Date: Thu, 5 May 2011 17:08:52 +0200 Subject: [PATCH] added seek to psgi custom object --- plugins/psgi/psgi.h | 1 - plugins/psgi/psgi_plugin.c | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/psgi/psgi.h b/plugins/psgi/psgi.h index aa95b400..5b1c6675 100644 --- a/plugins/psgi/psgi.h +++ b/plugins/psgi/psgi.h @@ -23,7 +23,6 @@ struct uwsgi_perl { SV *psgi_main; SV **psgi_func; CV *stream_responder; - CV *input_object; HV *streaming_stash; HV *input_stash; diff --git a/plugins/psgi/psgi_plugin.c b/plugins/psgi/psgi_plugin.c index 7c5a92bc..ed4b7783 100644 --- a/plugins/psgi/psgi_plugin.c +++ b/plugins/psgi/psgi_plugin.c @@ -123,6 +123,13 @@ ret: XSRETURN_IV(bytes); } +XS(XS_input_seek) { + + dXSARGS; + + psgi_check_args(1); + XSRETURN(0); +} XS(XS_input) { @@ -192,7 +199,7 @@ xs_init(pTHX) newXS("uwsgi::input::new", XS_input, "uwsgi::input"); newXS("uwsgi::input::read", XS_input_read, "uwsgi::input"); - //newXS("uwsgi::input::seek", XS_input_seek, "uwsgi::input"); + newXS("uwsgi::input::seek", XS_input_seek, "uwsgi::input"); uperl.input_stash = gv_stashpv("uwsgi::input", 0); @@ -553,7 +560,7 @@ int uwsgi_perl_request(struct wsgi_request *wsgi_req) { if (!hv_store(env, "psgi.input", 10, pi, 0)) goto clear; if (!hv_store(env, "psgix.io", 8, SvREFCNT_inc(pi), 0)) goto clear; - if (!hv_store(env, "psgix.input.buffered", 20, newSViv(1), 0)) goto clear; + if (!hv_store(env, "psgix.input.buffered", 20, newSViv(0), 0)) goto clear; PUSHMARK(SP);