[mod_python] merges results from previous requests of the same page

Clodoaldo clodoaldo.pinto.neto at gmail.com
Fri Jun 27 12:03:39 EDT 2008


2008/6/27 Giovanni Marco Dall'Olio <dalloliogm at gmail.com>:
> I'm getting some artifacts when I execute multiple time a script with
> different parameters, under mod_python.
>
> Basically I have a small applications which, depending of the value of
> a GET variable, reads some files stored in the server and returns to
> client a small web page, a representation of the values in those
> files.
>
> But the problem is that, when I request a page for the second time,
> apache returns a page which mixes the results from the previous
> requests of the same, even if it had different parameters.

If you are using variables in the page module scope try to create them
in the scope of the page function.

Regards, Clodoaldo

> Let's make an example.
>
> http://localhost/samplescript.py?values=1
> output: _|______
>
> -- restart apache --
>
> http://localhost/samplescript.py?values=2
> output: ______|_
>
> -- restart apache --
>
> http://localhost/samplescript.py?values=1
> output: _|______
> http://localhost/samplescript.py?values=2
> output: _|____|_
>
>
> How is that? I though mod_python initializes a different
> sub-interpreter every time a page is requested.
> My configuration of mod_python is very basilar: I have not configured
> any caching directive, and I am using a customized publisher handler.
> I am on a Ubuntu (same problem on debian), mod_python 3.3.1-2build1 on
> apache 2.2.8-1ubuntu0.2.
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list