[mod_python] Bizzare mod_python behavior (2 HTTP Responses for 1 Request?!)

Monsyne Dragon mdragon at rackspace.com
Wed Aug 18 17:48:54 EDT 2004


I have a mod_python app I am working on, and I am getting a bizzare reaction
from it. When I  do a request (get or post) apache returns TWO http
responses!! one is the correct response, the second looks like an
apache-generated html page that says the url is not found.
the http response code of both is 200 Ok.

The oddest thing is that this code works fine on another server!
Here is a an example request and response(s): (note this is running under
SSL.  )

++++++++++Begin+++++++++++++++++++++++++++++++++++++++++++++++++
GET /xmlrpc/Ticket HTTP/1.0
Host: core.some.com

HTTP/1.1 200 OK
Date: Mon, 16 Aug 2004 22:38:35 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_python/2.7.8 Python/2.2.2
mod_ssl/2.8.5 OpenSSL/0.9.6b PHP/4.2.2 mod_fastcgi/2.4.2
Connection: close
Content-Type: text/html

<html><head><title>Documentation</title></head><body><h1>Topics</h1><ul><li><
a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=createGenieTicket">createGenieTicket</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=createSubTicket">createSubTicket</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=createTicket">createTicket</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=getQueues">getQueues</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=getTicketCategories">getTicketCategories</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=getTicketSeverities">getTicketSeverities</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=getTicketSources">getTicketSources</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=getTicketSubcategories">
getTicketSubcategories</a></li></ul></body></html>HTTP/1.1 200 OK
Date: Mon, 16 Aug 2004 22:38:35 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_python/2.7.8 Python/2.2.2
mod_ssl/2.8.5 OpenSSL/0.9.6b PHP/4.2.2 mod_fastcgi/2.4.2
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>200 OK</TITLE>
</HEAD><BODY>
<H1>OK</H1>
The requested URL /xmlrpc/Ticket was not found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.27 Server at core.some.com Port 443</ADDRESS>
</BODY></HTML>
+++++++++End+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The other server (which works fine)  is thus:

Server: Apache/1.3.29 (Debian GNU/Linux) mod_python/2.7.10 Python/2.2.3+
mod_gzip/1.3.26.1a PHP/4.3.4 mod_fastcgi/2.4.0 mod_ssl/2.8.16 OpenSSL/0.9.7c
DAV/1.0.3

(note the diff. mod_python versions)
Curiously, it also seemed to work on yet another server, which had
mod_python/2.7.6 on it!

Does this sound like a 2.7.8 bug anyone recalls? Like one that was fixed by
2.7.10?
Or could a botched config in the httpd.conf do this somehow? If so what
 should I be looking for? I can't just compare the http.conf's on the two
 machines, alas, as they are too  different, and I don't know where to begin.

Note that regular html pages, and another mod_python app running on the same
servers (different handler & interpreter) do NOT exhibit this issue.

(yes, I would prefer to have my servers have the same config, but these are
production company servers, thus I have to take what we've got. :P )

--
	-M. Dragon

-------------------------------------------------------

-- 
--
	-M. Dragon


More information about the Mod_python mailing list