You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Monsyne Dragon <md...@rackspace.com> on 2004/08/20 17:46:18 UTC

[users@httpd] Bizzare apache 1.3 behavior (2 HTTP Responses for 1 Request?!)

I have a small webapp I am running under Apache 1.3 using the mod_python 
handler, and I am getting a bizzare reaction from Apache on it on one (but 
only one!) of the servers I am trying to run it on. 

When I  do a request (get or post) apache returns TWO http
responses!! one is the correct response from the python script, 
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.

Now the apache config on the two servers is not identical (I wish it was, but 
it isn't and there isn't much I can do about it.)  I'm guessing that the 
mod_python handler is running, producing output, and then for some reason 
Apache is running a second handler...?  

Does anyone know if  some misconfig in httpd.conf could cause that? 
If so, what should I look for? I haven't a clue how to debug this at the 
moment . I tried asking on the mod_python list to see if it could be a bug in 
that, but they haven't a clue either.

here's a snippet of the conf file that is responsible for setting up this 
webapp :
++++++++++++++++++++++++++++++++++
  <Location /xmlrpc>
     <IfModule mod_python.c>
         PythonPath "sys.path + ['/home/core/python/lib']"
         SetHandler python-program
         PythonInterpreter XMLRPCInterpreter
         PythonHandler XMLRPCHandler
         PythonOption CORE_ROOT /home/core
     </IfModule>
  </Location>
++++++++++++++++++++++++++++++++++


The oddest thing is that this code works fine on another server! 
Note the Server: line for the versions...
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">creat
eGenieTicket</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=createSubTicket">createS
ubTicket</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=createTicket">createTick
et</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">get
TicketCategories</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=getTicketSeverities">get
TicketSeverities</a></li><li><a
 href="https://core.some.com:443/xmlrpc/Ticket?topic=getTicketSources">getTic
ketSources</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

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

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org