Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Delivered-To: moderator for tomcat-dev@jakarta.apache.org Received: (qmail 70933 invoked from network); 5 Mar 2001 19:51:33 -0000 Received: from unknown (HELO mailin2.email.bigpond.com) (139.134.6.23) by h31.sny.collab.net with SMTP; 5 Mar 2001 19:51:33 -0000 Received: from pastornet.net.au ([139.134.4.55]) by mailin2.email.bigpond.com (Netscape Messaging Server 4.15) with SMTP id G9QQ0U00.GHM for ; Tue, 6 Mar 2001 05:55:42 +1000 Received: from CPE-203-45-133-5.qld.bigpond.net.au ([203.45.133.5]) by mail4.bigpond.com (Claudes-Speedi-MailRouter V2.9c 7/2595460); 06 Mar 2001 05:50:41 Message-ID: <3AA3ED19.95011E9A@pastornet.net.au> Date: Tue, 06 Mar 2001 05:46:33 +1000 From: David Campbell X-Mailer: Mozilla 4.73 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Patch for HTTP protocol bug in jakarta-apache Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi, I would like to contribute the diff below, that should correct a current HTTP protocol violation in virtually every request served by jakarta-apache, and prevents jakarta-apache URLs being opened by various strict HTTP clients such as PHP and Yospace SmartPhone WAP browser. The problem has been in the bug database for some time at http://znutar.cortexity.com/BugRatViewer/ShowReport/151 Basically the problem is that jakarta-tomcat responses return: HTTP/1.1 200 but does not have a space character after the Status-Code (ie the 200), which is required by the spec, even if the Reason-Phrase is the empty string: From the HTTP spec: 6.1 Status-Line The first line of a Response message is the Status-Line, consisting of the protocol version followed by a numeric status code and its associated textual phrase, with each element separated by SP characters. No CR or LF is allowed except in the final CRLF sequence. Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF ------------------------------------------------------------------------------------------------------------------------- The diff for jakarta-tomcat/src/share/org/apache/tomcat/service/http/Attic/HttpResponseAdapter.java diff -r1.11.2.1 HttpResponseAdapter.java 134a135 > printHead(" "); 136d136 < printHead(" "); Note, I don't have a build environment, so this is untested by me, but it should work. Please CC me directly with any e-mails because I'm not on the list. -- Regards, -- Dave Campbell PHONE AUS 07 3216 6015 PHONE INTL +61 7 3216 6015