Sounds good. Can you please check I implemented all your patches correctly in trunk?
It is good about a wsgi expect like you here. The issue with chunk_size that you discovered may actually have been the cause of a timeout issue that some users have been having. Time will tell. I am still uneasy about using script_name in urls. I am afarid it may break backward compatibility with cgi or fcgi. We need to test it. Massimo On Sep 5, 6:27 am, Graham Dumpleton <[email protected]> wrote: > On Sep 5, 2:16 pm, Yarko Tymciurak <[email protected]> wrote: > > > > > Graham - > > > On Fri, Sep 4, 2009 at 11:08 PM, Graham Dumpleton < > > > [email protected]> wrote: > > > > On Sep 5, 1:19 pm, Wes James <[email protected]> wrote: > > > > On Fri, Sep 4, 2009 at 8:21 PM, mdipierro<[email protected]> > > > wrote: > > > > > command-line option > > > > A command line option makes no sense in the context of either the URL > > > patch or file_wrapper patch. This is because both are really only > > > relevant within context of Apache/mod_wsgi at this point for which > > > there is no command line execution of any web2py provides script. > > > > What are the normal options for specifying global options in web2py. > > > Does the options.py file still get used when hosted under Apache/ > > > mod_wsgi. > > > Command line options in web2py get saved in a file, > > parameters_[port_number].py. > > > For example, to set an admin password for apache, you would run a command > > line option, exit, and restart mod_wsgi (to re-read the parameters file). > > > The parameters file can be edited manually too. > > For the wsgi.file_wrapper extension, since know that Apache/mod_wsgi > does the right thing, could also just say something like: > > if request and request.env.mod_wsgi.version and \ > request.env.mod_wsgi_version >= (2,4) and > request.env.wsgi_file_wrapper: > raise HTTP(200, request.env.wsgi_file_wrapper(stream, > chunk_size), > **headers) > else: > raise HTTP(200, streamer(stream, chunk_size=chunk_size), > **headers) > > Do the explicit check for mod_wsgi version 2.4 as earlier versions had > bugs in wsgi.file_wrapper. > > This avoids the whole issue of having an option to enable or not as > specifically targeting WSGI hosting mechanism/version which is known > to work. > > This check would need to be done in few places where wsgi.file_wrapper > was being incorporated. > > Graham > > > - Yarko > > > > Alternative is you use WSGI environment variables, which can be set in > > > Apache/mod_wsgi using SetEnv directive. Thus: > > > > SetEnv web2py.relocatable_application 1 > > > SetEnv web2py.file_wrapper_extension 1 > > > > These I think would equate to check in respective routines something > > > like: > > > > if request and request.env.web2py_relocation_application \ > > > and int(request.env.web2py_relocation_application): > > > > Graham --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

