It's there.

...line 248....
def environ_aux(environ,request):
    new_environ = copy.copy(environ)
    new_environ['wsgi.input']=request.body
    new_environ['wsgi.version']=1
    return new_environ
.....
...line 300...
    try:
        try:
            ....
            request.wsgi.environ = environ_aux(environ,request)



On Oct 31, 1:37 pm, mdipierro <[email protected]> wrote:
> It should be
>
> request.wsgi.environ['wsgi.input'] = request.body
>
> can you check in gluon main.py should should have this line
>
>             request.wsgi.environ = environ_aux(environ,request)
>
> and environ_aux also on main.py defines wsgi.input
>
> On Oct 31, 1:22 pm, hcvst <[email protected]> wrote:
>
> > Hi Massimo,
>
> > I am running Version 1.71.0 (2009-10-31 01:13:28).
> > wsgi.environ does not have wsgi.input (for get or post)
> > I checked locally and GAE does not find it either.
> > I currenty have to add it:
> > request.wsgi.environ['wsgi.input'] = request.env.wsgi_input
>
> > HC
>
> > On Oct 31, 6:41 pm, mdipierro <[email protected]> wrote:
>
> > > request.env is the web2py environment
>
> > > request.wsgi.environ is the environment you want (created by web2py
> > > for your app). It has wsgi.input.
>
> > > On Oct 31, 9:32 am, hcvst <[email protected]> wrote:
>
> > > > Hi Massimo,
>
> > > > thanks, this makes wsgi a lot easier - there are a few issues however:
>
> > > > 1. environ['wsgi.input'] does not seem to exist - there is however
> > > > request.env.wsgi_input.
> > > > 2. Not sure what the wsgi spec says but one has to call seek(0) on
> > > > wsgi_input to 'rewind' the buffer when
> > > > using Google's webapp for example as Google does not call getvalue()
> > > > but read() to get the buffer contents.
> > > > 3. The lamda your start_response returns also appears to write to
> > > > response.body - Again I am not sure
> > > > what the wsgi specs say but usually the call to app(env,
> > > > start_response) returns a generator one calls to
> > > > get the contents. Google's webapp works nicely with the
> > > > response.body.write method though.
>
> > > > HC
>
> > > > On Oct 31, 1:24 am, mdipierro <[email protected]> wrote:
>
> > > > > It fixes some problems introduced by new features in 1.69.1.
>
> > > > > It also includes:
> > > > > - db(...).select().as_dict()
> > > > > - Experimental distributed transactions with mysql, postgresql and
> > > > > firebird
> > > > > - Improved validators
> > > > > - ability to call wsgi apps from actions
>
> > > > >     def index():
> > > > >         return somewsgiapp
> > > > > (request.wsgi.environ,request.wsgi.start_response)
>
> > > > > and to apply wsgi middleware to normal web2py actions
>
> > > > >     @request.wsgi.middleware(somewsgimiddleware,someother)
> > > > >     def index(): return 'hello world'
>
> > > > > Please report any error.
>
> > > > > Thanks to Mr Freeze, Thadeus and Jonathan for help.
>
> > > > > Happy Halloween to everybody.
>
> > > > > Massimo
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to