You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by Geert Jansen <ge...@boskant.nl> on 2003/03/02 15:54:19 UTC
A testcase showing the headers_out problem
Hi Grisha,
I'm sorry if I'm spamming the list, but included in this email is a patch
for the headers_out test case so that it demonstrates the problem.
Greetings,
Geert Jansen
Index: test/httpdconf.py
===================================================================
RCS file: /home/cvspublic/httpd-python/test/httpdconf.py,v
retrieving revision 1.6
diff -u -r1.6 httpdconf.py
--- test/httpdconf.py 23 Jan 2003 20:20:00 -0000 1.6
+++ test/httpdconf.py 2 Mar 2003 14:52:51 -0000
@@ -135,6 +135,10 @@
def __init__(self, dir, *args):
ContainerTag.__init__(self, self.__class__.__name__, dir, args)
+class DirectoryIndex(Directive):
+ def __init__(self, val):
+ Directive.__init__(self, self.__class__.__name__, val)
+
class DocumentRoot(Directive):
def __init__(self, val):
Directive.__init__(self, self.__class__.__name__, val)
@@ -208,6 +212,10 @@
Directive.__init__(self, self.__class__.__name__, val)
class PythonHandler(Directive):
+ def __init__(self, val):
+ Directive.__init__(self, self.__class__.__name__, val)
+
+class PythonAccessHandler(Directive):
def __init__(self, val):
Directive.__init__(self, self.__class__.__name__, val)
Index: test/test.py
===================================================================
RCS file: /home/cvspublic/httpd-python/test/test.py,v
retrieving revision 1.28
diff -u -r1.28 test.py
--- test/test.py 12 Feb 2003 16:10:13 -0000 1.28
+++ test/test.py 2 Mar 2003 14:52:52 -0000
@@ -573,8 +573,10 @@
ServerName("test_req_headers_out"),
DocumentRoot(DOCUMENT_ROOT),
Directory(DOCUMENT_ROOT,
- SetHandler("python-program"),
+ AddHandler("python-program .py"),
+ DirectoryIndex("/tests.py"),
PythonHandler("tests::req_headers_out"),
+ PythonAccessHandler("tests::req_headers_out_access"),
PythonDebug("On")))
return str(c)
@@ -583,7 +585,7 @@
print "\n * Testing req.headers_out"
conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT)
- conn.putrequest("GET", "/tests.py", skip_host=1)
+ conn.putrequest("GET", "/", skip_host=1)
conn.putheader("Host", "test_req_headers_out:%s" % PORT)
conn.endheaders()
response = conn.getresponse()
Index: test/htdocs/tests.py
===================================================================
RCS file: /home/cvspublic/httpd-python/test/htdocs/tests.py,v
retrieving revision 1.25
diff -u -r1.25 tests.py
--- test/htdocs/tests.py 12 Feb 2003 16:10:13 -0000 1.25
+++ test/htdocs/tests.py 2 Mar 2003 14:52:53 -0000
@@ -654,6 +654,10 @@
return apache.OK
+def req_headers_out_access(req):
+
+ return apache.OK
+
def srv_register_cleanup(req):
req.cleanup_data = "test ok"
Re: 3.0.3
Posted by "Gregory (Grisha) Trubetskoy" <gr...@apache.org>.
Great! Anyone else?
On Fri, 7 Mar 2003, Geert Jansen wrote:
> On Fri, Mar 07, 2003 at 03:30:47PM -0500, Gregory (Grisha) Trubetskoy wrote:
>
> Hi Grisha,
>
> > OK, I finally got some time to look at Geert's bug and put in a fix for
> > it... Thanks Geert.
> >
> > I've tagged release-3-0-3. Please test it. For those too lazy to use CVS,
> > there is a tgz file at http://www.modpython.org/tmp/mod_python-3.0.3.tgz
> >
> > As always, testing is simple:
> >
> > $ tar xzvf mod_python-3.0.3.tgz
> > $ cd mod_python-3.0.3
> > $ ./configure --with-apxs=/your/apxs
> > $ make
> > $ su/sudo
> > # make install
> > # exit
> > $ cd test
> > $ python test.py
> >
> > Please test it so we can release it sooner. This release has some
> > long-awaited fixes and features, including a win32 installer (look in dist
> > subdirectory for details on that).
>
> I tested release-3-0-3 and it seems to works fine. Both the test suite and
> Draco run without problems. I'd say we have a GO for 3.0.3!
>
> Thanks for fixing the bug.
>
> Greetings,
> Geert
>
Re: 3.0.3
Posted by Geert Jansen <ge...@boskant.nl>.
On Fri, Mar 07, 2003 at 03:30:47PM -0500, Gregory (Grisha) Trubetskoy wrote:
Hi Grisha,
> OK, I finally got some time to look at Geert's bug and put in a fix for
> it... Thanks Geert.
>
> I've tagged release-3-0-3. Please test it. For those too lazy to use CVS,
> there is a tgz file at http://www.modpython.org/tmp/mod_python-3.0.3.tgz
>
> As always, testing is simple:
>
> $ tar xzvf mod_python-3.0.3.tgz
> $ cd mod_python-3.0.3
> $ ./configure --with-apxs=/your/apxs
> $ make
> $ su/sudo
> # make install
> # exit
> $ cd test
> $ python test.py
>
> Please test it so we can release it sooner. This release has some
> long-awaited fixes and features, including a win32 installer (look in dist
> subdirectory for details on that).
I tested release-3-0-3 and it seems to works fine. Both the test suite and
Draco run without problems. I'd say we have a GO for 3.0.3!
Thanks for fixing the bug.
Greetings,
Geert
3.0.3
Posted by "Gregory (Grisha) Trubetskoy" <gr...@apache.org>.
OK, I finally got some time to look at Geert's bug and put in a fix for
it... Thanks Geert.
I've tagged release-3-0-3. Please test it. For those too lazy to use CVS,
there is a tgz file at http://www.modpython.org/tmp/mod_python-3.0.3.tgz
As always, testing is simple:
$ tar xzvf mod_python-3.0.3.tgz
$ cd mod_python-3.0.3
$ ./configure --with-apxs=/your/apxs
$ make
$ su/sudo
# make install
# exit
$ cd test
$ python test.py
Please test it so we can release it sooner. This release has some
long-awaited fixes and features, including a win32 installer (look in dist
subdirectory for details on that).
Grisha