mod_python preprocess/filter before proxy
Graham Dumpleton
Graham.Dumpleton at gmail.com
Thu Sep 27 19:41:47 EDT 2007
More information about the Python-list mailing list
Thu Sep 27 19:41:47 EDT 2007
- Previous message (by thread): Streaming files from python cgi
- Next message (by thread): mod_python preprocess/filter before proxy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Yes, use PythonInputFilter directive to specify an input filter. http://www.modpython.org/live/current/doc-html/dir-filter-if.html Input filters which modify the length of the data may be an issue though when doing proxying however. If you cant work it out, possibly more appropriate to take your questions to the official mod_python mailing list referenced on the mod_python site. Graham On Sep 27, 9:26 pm, David Sánchez Martín <dsanc... at e2000.es> wrote: > Hi! > > I've seen the message below in this python list, that seems to be > unanswered. > > I'm trying to do the pretty same thing. > > There's a way to preprocess the request with a mod_python handler and then > proxying it with mod_proxy? > > Thank you very much in advance, and sorry for trying to revive such an old > message. > > Cheers. > > > > > > >whale whale at mycameo.com > >Tue Mar 25 05:49:42 CET 2003 > > >I use Apache2.0.44 and mod_python3.0.1. > >I add ProxyPass and PythonHandler directives in httpd.conf > >## httpd.conf > >ProxyPass /test/ http://www.test.com > >ProxyPassReverse /test/ http://www.test.com > ><Location /> > > AddHandler python-program .htm .html > > PythonHandler mptest > ></Location> > > >And mptest.py: > >from mod_python import apache > >def handler(req): > > req.write('Hello!!') > > return apache.OK > > >ex. My apache server iswww.server.com. > >When I browsed the local server request(ex. > >http://www.server.com/1.html), > >I received 'Hello!!' response, the python handler worked well. > >But when I browse the proxy request(ex. > >http://www.server.com/test/1.html), > >the response I received is the original content of > >http://www.test.com/1.html, not 'Hello!!'. > >The proxy requests didn't seem to be processed by mod_python handler. > >How could I pre-process the proxy request before mod_proxy module? > >Thanks a lot!! > > --- > David Sanchez Martin > Administrador de Sistemas > dsanc... at e2000.es > GPG Key ID: 0x37E7AC1F > > E2000 Nuevas Tecnologías > Tel : +34 902 19 61 77 > > David Sánchez Martín.vcf > 1KDownload > > smime.p7s > 1KDownload
- Previous message (by thread): Streaming files from python cgi
- Next message (by thread): mod_python preprocess/filter before proxy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list