Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E60CA918F for ; Sat, 21 Apr 2012 18:57:17 +0000 (UTC) Received: (qmail 13382 invoked by uid 500); 21 Apr 2012 18:57:17 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 13345 invoked by uid 500); 21 Apr 2012 18:57:17 -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 13336 invoked by uid 99); 21 Apr 2012 18:57:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2012 18:57:17 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ivan.vaskevych@gmail.com designates 209.85.160.51 as permitted sender) Received: from [209.85.160.51] (HELO mail-pb0-f51.google.com) (209.85.160.51) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2012 18:57:12 +0000 Received: by pbcwy12 with SMTP id wy12so1933716pbc.10 for ; Sat, 21 Apr 2012 11:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=iTsdF1w3vSnQiTYNFqQebkKGnsfs8ho49aOeP/WUp6o=; b=X6OYh0g7qZECGUsd0V3OElq42hnnlYUIXnXcaTCKFqTxJxVnoR4RpgPGtHQ/uurRyP oPBC0DbIoSkLz2Iblfn25xJaQUVw5wLfkpZRHeYgl6WH8EggA+uftsaWIFIET0JXJdn+ 5/PEZNWzMpLwy/9Ant2Cv5jf3yKaYvOYJ0DJFKYOfumY5SGJNxKKZmvcGNtIwfPmOgrU r45b0jcZqpYQRF9X2FgTfU7WisoJ0B7PmhsevsELQwdqpimbSXVbfFaeUBgrMMv0BQ02 bpKQz1+j0tRppfV6QdPaxiM/9RZeEO2CFp1Ca/QDv3D9Hi3WO56neWqeed7GPho9QsZA jHJQ== Received: by 10.68.216.129 with SMTP id oq1mr5966145pbc.62.1335034612219; Sat, 21 Apr 2012 11:56:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.44.72 with HTTP; Sat, 21 Apr 2012 11:56:32 -0700 (PDT) In-Reply-To: <1335034479.9203.20.camel@ubuntu> References: <1335031846.9203.12.camel@ubuntu> <1335034479.9203.20.camel@ubuntu> From: Ivan Vaskevych Date: Sat, 21 Apr 2012 21:56:32 +0300 Message-ID: Subject: Re: HTTP specification problem: DefaultResponseParser To: HttpComponents Project Content-Type: multipart/alternative; boundary=e89a8ff243e3d2ff6a04be34f79b X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff243e3d2ff6a04be34f79b Content-Type: text/plain; charset=ISO-8859-1 Yeah, works for me... Cheers On Sat, Apr 21, 2012 at 9:54 PM, Oleg Kalnichevski wrote: > On Sat, 2012-04-21 at 21:32 +0300, Ivan Vaskevych wrote: > > Thanks mate! > > > > Yeah, I already overridden the parseStatus and it works for me. I'm just > > curious, why browsers are ok with no status. > > Would be a good idea to implement this, at least through some conf > > parameter. > > > > Cya and thanks for HC! > > > > Browser do a lot of stupid things in order to maximize compatibility > with all those broken CGI scripts out there. HttpClient is not a browser > so we ought not sink as low. > > Usually Httpclient supports lenient behavior in those situations where > the spec is too vague or ambiguous, which is not the case in this > particular situation. As far as configuration parameters go HttpClient > already suffers from overuse (or abuse) of config parameters. People > should get used to the concept of having to write some code in order to > adapt HttpClient to their specific application contexts. > > Cheers > > Oleg > > > Ivan > > > > On Sat, Apr 21, 2012 at 9:10 PM, Oleg Kalnichevski > wrote: > > > > > On Sat, 2012-04-21 at 17:00 +0300, Ivan Vaskevych wrote: > > > > Hi folks, > > > > > > > > > > > > httpclient: 4.1.3 > > > > httpcore: 4.1.4 > > > > > > > > I get a response from the http server with empty status, and get the > > > > ProtocolException from HC. The stack trace is below. > > > > The site is https. Browsers (IE, Firefox) open the page successfully. > > > > Checked with Fiddler, no status in the first line indeed, just > > > "HTTP/1.1", > > > > then goes LF-CR and "Date:...." > > > > > > > > The research shows that omitted status code in the response from the > > > server > > > > means it's 200 OK (http://www.ietf.org/rfc/rfc3875, p.23). > > > > Can you please check this? > > > > > > > > Thanks. > > > > > > > > > > Hi Ivan > > > > > > As far as I know the official document that specifies the HTTP protocol > > > is still RFC 2616 [1]. The protocol specification is quite clear as to > > > what constitutes a valid HTTP status line (see section 6.1) > > > > > > This, however, does not prevent you from using a custom, more lenient > > > response parser, as described here [2] > > > > > > Hope this helps > > > > > > Oleg > > > > > > [1] http://www.faqs.org/rfcs/rfc2616.html > > > [2] > > > > > > > http://hc.apache.org/httpcomponents-client-ga/tutorial/html/advanced.html#d5e1341 > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > > > For additional commands, e-mail: dev-help@hc.apache.org > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > For additional commands, e-mail: dev-help@hc.apache.org > > -- Best Regards, Ivan --e89a8ff243e3d2ff6a04be34f79b--