Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 47732 invoked from network); 13 Aug 2010 19:22:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Aug 2010 19:22:32 -0000 Received: (qmail 79706 invoked by uid 500); 13 Aug 2010 19:22:29 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 79620 invoked by uid 500); 13 Aug 2010 19:22:28 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 79611 invoked by uid 99); 13 Aug 2010 19:22:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Aug 2010 19:22:28 +0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of heathen02@gmail.com designates 209.85.216.173 as permitted sender) Received: from [209.85.216.173] (HELO mail-qy0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Aug 2010 19:22:23 +0000 Received: by qyk5 with SMTP id 5so575932qyk.18 for ; Fri, 13 Aug 2010 12:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=JGOs5J5PsdSna8ci6tw61p8Zaa9uBlKFL3lhA8q+/A4=; b=PVPVp1QbhllEB0H7JZTL173jVg31Y8i2Q309Kqudu/qXhbkYOe3USATd0EwWE0ZpUT Jl0wWP9Je/8Gvh0wPWTAgYGREWmSY9fhVllZJlCF7VPPxCjEk2K+YVz7ENQb1RnbFHyo aVTDKAZGrU5rYEfutaQqOBzFQPhHqjCnkst7k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Rp/Awfi6Kw6EaHVrXoO0HUhu4Fz1iNo/i4do1c4nx1oTqDWS/7xY8bRSsLywFE1Gaa qE/6ZXXWkvxiGhmu7XAQM3w5gq6jXnZb1Z2ZLovvJleBSsDeCKu4/innfuHhOtoBBFGE GC0xEbGdi//kF8d1DmAOzrz4fvGMo2U/NgTqY= MIME-Version: 1.0 Received: by 10.229.122.21 with SMTP id j21mr1532459qcr.257.1281727322684; Fri, 13 Aug 2010 12:22:02 -0700 (PDT) Received: by 10.229.59.146 with HTTP; Fri, 13 Aug 2010 12:22:02 -0700 (PDT) In-Reply-To: <4C64615B.1070908@pidster.com> References: <4C64615B.1070908@pidster.com> Date: Fri, 13 Aug 2010 15:22:02 -0400 Message-ID: Subject: Re: Need confirmation of issue: HTTP simple requests broken as of Apache Tomcat 5.5.28. From: Nick Langlois To: Tomcat Users List Content-Type: multipart/alternative; boundary=00c09f8de3a5c47c79048db9652f --00c09f8de3a5c47c79048db9652f Content-Type: text/plain; charset=ISO-8859-1 On Thu, Aug 12, 2010 at 5:02 PM, Pid wrote: > On 11/08/2010 14:38, Nick Langlois wrote: > > Hi, > > I need confirmation of an issue I've encountered while upgrading from > > Apache Tomcat 5.5.25 to 5.5.29 running in Java 1.5.0_22 on Solaris 10u8. > > Unfortunately, I'm going about this backwards as I've already created a > bug > > report. The tomcat site, however, recommends that confirmation should be > > received as to whether a suspected bug is a bug or not on the tomcat user > > mailing list. > > > > Issue found in: Apache Tomcat 5.5.29 > > Issue introduced in: Apache Tomcat 5.5.28 > > > > > > Issue: > > > > Get "HTTP/1.1 400 Bad Request" response back when Tomcat receives an HTTP > > simple request (no HTTP version specified in request line). > > > > > > Expected behaviour: > > > > According to its documentation, tomcat 5.5.x's HTTP connector is > compliant > > with the HTTP/1.1 RFC, and will seamlessly transition to HTTP/1.0 if an > > HTTP/1.0 request is received. For backwards compatibility (I assume), > the > > HTTP 1.0 RFC handles HTTP 0.9 requests for older clients, referring to > these > > requests as "simple requests" in the RFC. Thus, according to the RFC, > > tomcat should respond with a "simple response" should it receive a > "simple > > request". > > > > > > Example of expected behaviour: > > > > wcars1u7-unit1# telnet localhost 5555 > > Trying 127.0.0.1... > > Connected to localhost. > > Escape charac= ter is '^]'. > > GET /index.html > > > > > > > > > > Zack Networks Application Server > > > > > > > > > >

No application is available at this URL. Please see the product > > documentation for the correct URL.

> > > > > > Connection to localhost closed by foreign host. > > wcars1u7-unit1# > > > > > > Behaviour I'm seeing: > > > > wcars1u7-unit1# telnet localhost 8080 > > Trying 127.0.0.1... > > Connected to localhost. > > Escape character is '^]'. > > GET /index.html > > HTTP/1.1 400 Bad Request > > Server: Apache-Coyote/1.1 > > Transfer-Encoding: chunked > > Date: Tue, 10 Aug 2010 18:32:36 GMT > > Connection: close > > > > 0 > > > > Connection to localhost closed by foreign host. > > wcars1u7-unit1# > > > > > > With debug enabled, tomcat logs the following thrown exception: > > > > 2010-07-29 15:49:22,068 [http-8080-Processor24] DEBUG > > > > org.apache.coyote.http11.Http11Processor - Error parsing HTTP request > header > > > > java.lang.IllegalArgumentException: Invalid character (CR or LF) found > > in method name > > at > org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:474) > > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) > > > > at > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) > > at > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) > > at > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) > > > > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) > > at java.lang.Thread.run(Thread.java:595) > > > > Further information can be found in the bug report: > > > > https://issues.apache.org/bugzilla/show_bug.cgi?id=3D49718 > > > > Can someone please confirm this issue? > > Is it possible to get some indication as to if, when, and in what version > > this issue will be fixed in the Tomcat 5.5.x release? > > I'm guessing that no-ones replying, because there's no known issue here. > > Are you sure the issue isn't a result of the means of making the test > request? > I'm sure, as I've been doing it for years. It's great for debugging in environment where you may not have any access to a system other than through an established ssh or telnet session to the server for security reasons (like at many of our customers). You can do something similar to debug HTTPS requests using the "openssl s_client" option. In either case, you just must ensure you send your HTTP request before the server side times out and closes the TCP connection. > > p > > --00c09f8de3a5c47c79048db9652f--