BUG:We dont need to send Status for error 500

Help
2010-09-07
2013-06-06
  • Pavel Bazanov

    Pavel Bazanov - 2010-09-07

    Hello,

    There are such lines in nusoap.php:

    $this->outgoing_headers = "HTTP/1.0 500 Internal Server Error";
    $this->outgoing_headers = "Status: 500 Internal Server Error";

    The second line should be removed because it can cause problems on some hosting servers. For example, on the servers of the biggest UK hosting provider - FastHosts - you don't remove the second line and issue a fault (for example: return new nusoap_fault()) the nusoap response will be substituted for the the custom 500 Internal Server Error. I am not sure if it is Apache substitutes the response or something else, but the fact is - correct response with soap fault is completely substituted by something like "The server encountered an internal error … Please contact the server administrator, webmaster@blablabla.com blablabla".

    I found this problem a long time ago, and I don't remember how, but I found out that such problem can be caused by sending a Status header when status is already sent in "HTTP/1.0 500 Internal Server Error" header.

    I removed the second line and I never had problems. Recently I downloaded the new version of nusoap where the second line exists and I got the problem again, so I spent 3 or 4 hours before I found out I have to remove that line.

    Hope you fix it in the future version.

     
  • Scott Nichol

    Scott Nichol - 2011-01-13

    I agree that the "Status:" header should be unnecessary.  I am commenting it out for now to see whether its removal causes problems with any web servers.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks