Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 28618 invoked from network); 3 Mar 2010 14:07:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Mar 2010 14:07:26 -0000 Received: (qmail 38442 invoked by uid 500); 3 Mar 2010 14:07:19 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 38358 invoked by uid 500); 3 Mar 2010 14:07:19 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 38350 invoked by uid 99); 3 Mar 2010 14:07:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Mar 2010 14:07:19 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of supun06@gmail.com designates 209.85.221.187 as permitted sender) Received: from [209.85.221.187] (HELO mail-qy0-f187.google.com) (209.85.221.187) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Mar 2010 14:07:11 +0000 Received: by qyk17 with SMTP id 17so779383qyk.11 for ; Wed, 03 Mar 2010 06:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=QV2IVx21ysy57jk5yQlpUR4AlXqjDzDF0Zc8foeCO4Y=; b=lZSSGYKMYEgh750hmjj28iJC5eWt3WY9kOH7vc71Wd2zWgEqb90sWJSzii2F/NaefO UkXlGSbElsNffxt14kp0Iy87erW3ykuHAkBO8q6GUvHqdgzQCue59dm+1VgtDwuiqxqp p5Qfo/0+pKSxpkOS6cjED6temjJKose5mFVjE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=yIH/EJuocn6CK2q40j6pUdgIT6I8cGKg4v5miNFz1pOLH5K6LqpqHFLA/pBcNcf+z/ +x6pW/1NGu4ZAdxPDA3TM642ZV4x0SR2vh5H+WU5T0u7HLZP5UKTu84ykENBroIlth14 QR3g2/WpKc5BhK1VQVfVXlWL7ss2tT0JNm+is= MIME-Version: 1.0 Received: by 10.229.211.210 with SMTP id gp18mr336238qcb.31.1267625210255; Wed, 03 Mar 2010 06:06:50 -0800 (PST) Date: Wed, 3 Mar 2010 19:36:50 +0530 Message-ID: Subject: HTTP Core NIO tries to read the request line twice From: Supun Kamburugamuva To: HttpComponents Project Content-Type: multipart/alternative; boundary=0016361e82025d9c380480e5fe96 --0016361e82025d9c380480e5fe96 Content-Type: text/plain; charset=ISO-8859-1 Hi, Hi, We got the exception[2] from couple of users. But couldn't reproduce this on our own. >From the logs it seems that, before this exception NHttpServiceHandler.inputReady method has being called for the same request. Also the request line is logged and is perfectly valid. So my conclusion is HTTP core tries to read the request headers twice and second time it fails. The exception we got here is generated by a version that uses the Apache HTTP Core 4.0.beta1. Also this same issue has being observed with the HTTP Core 4.1.alpha1 as well [1]. Is this a known issue in HTTP Core? Or is there some way that we can avoid this case? Any help will be greatly appreciated. Thanks, Supun.. [1] http://wso2.org/forum/thread/8867 [2] org.apache.http.ProtocolException: Invalid request line: at org.apache.http.impl.nio.codecs.AbstractMessageParser.parse(AbstractMessageParser.java:184) at org.apache.http.impl.nio.DefaultNHttpServerConnection.consumeInput(DefaultNHttpServerConnection.java:152) at org.apache.synapse.transport.nhttp.LoggingNHttpServerIOTarget.consumeInput(LoggingNHttpServerIOTarget.java:154) at org.apache.http.impl.nio.DefaultServerIOEventDispatch.inputReady(DefaultServerIOEventDispatch.java:147) at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:161) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:339) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:319) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:275) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:528) at java.lang.Thread.run(Thread.java:636) Caused by: org.apache.http.ParseException: Invalid request line: at org.apache.http.message.BasicLineParser.parseRequestLine(BasicLineParser.java:312) at org.apache.http.impl.nio.codecs.HttpRequestParser.createMessage(HttpRequestParser.java:75) at org.apache.http.impl.nio.codecs.AbstractMessageParser.parseHeadLine(AbstractMessageParser.java:133) at org.apache.http.impl.nio.codecs.AbstractMessageParser.parse(AbstractMessageParser.java:182) -- Software Engineer, WSO2 Inc http://wso2.org supunk.blogspot.com --0016361e82025d9c380480e5fe96--