Bug#403311: debbugs: soap.cgi sends HTTP 500 server error when given a wrong Content-Type in request
Package: debbugs
Version: Bugs server gets HTTP 500 error when wrong content type is posted to itSeverity: normal
I tried to simulate a request from apt-listbugs using wget and forgot to override the Content-Type header of the request. This caused
soap.cgi to generate a "500 Server Error" response.
Here is the wget command I used:
$wget -d -S -4 --header='SOAPAction: ""' --save-headers --post-file=postdata.xml '
http://bugs.donarmstrong.com/cgi-bin/soap.cgi'
And here is the debug output from wget:
DEBUG output created by Wget 1.10.2 on linux-gnu.
--12:27:36--
http://bugs.donarmstrong.com/cgi-bin/soap.cgi
=> `wget.out.1'
Resolving bugs.donarmstrong.com... 138.23.92.67
Caching bugs.donarmstrong.com
=> 138.23.92.67
Connecting to bugs.donarmstrong.com|138.23.92.67|:80... connected.
Created socket 5.
Releasing 0x0808fee8 (new refcount 1).
---request begin---
POST /cgi-bin/soap.cgi HTTP/1.0
User-Agent: Wget/1.10.2
Accept: */*
Host: bugs.donarmstrong.com
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 1289
SOAPAction: ""
---request end---
[writing POST file postdata.xml ... done]
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 500 Internal Server Error
Date: Sat, 16 Dec 2006 01:27:37 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) mod_perl/1.29
SOAPServer: SOAP::Lite/Perl/0.60
Content-Length: 568
Connection: close
Content-Type: text/xml; charset=utf-8
---response end---
HTTP/1.1 500 Internal Server Error
Date: Sat, 16 Dec 2006 01:27:37 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) mod_perl/1.29
SOAPServer: SOAP::Lite/Perl/0.60
Content-Length: 568
Connection: close
Content-Type: text/xml; charset=utf-8
Closed fd 5
12:27:37 ERROR 500: Internal Server Error.
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-k7
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Here is the content of
postdata.xml:
<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
">
<env:Body>
<n1:get_status xmlns:n1="Debbugs/SOAP/Status"
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
">
<bugnumber n2:arrayType="xsd:string[26]"
xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="n2:Array">
<item>316173</item>
<item>320048</item>
<item>320063</item>
<item>327210</item>
<item>393083</item>
<item>315847</item>
<item>322604</item>
<item>327269</item>
<item>332791</item>
<item>380182</item>
<item>381376</item>
<item>390819</item>
<item>390893</item>
<item>391265</item>
<item>391271</item>
<item>391472</item>
<item>396265</item>
<item>397310</item>
<item>340538</item>
<item>374160</item>
<item>383659</item>
<item>384537</item>
<item>385223</item>
<item>390823</item>
<item>393638</item>
<item>400918</item>
</bugnumber>
</n1:get_status>
</env:Body>
</env:Envelope>
I realize that this is a client error but still I'd expect the server to handle this more gracefully.
Cheers,
--Amos
Reply to: