hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Bryant (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCLIENT-1711) defaulthttpresponseparser parseHead fails to return on live stream
Date Sat, 09 Jan 2016 00:42:39 GMT
Peter Bryant created HTTPCLIENT-1711:
----------------------------------------

             Summary: defaulthttpresponseparser parseHead fails to return on live stream
                 Key: HTTPCLIENT-1711
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1711
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 4.5.1
            Reporter: Peter Bryant


Calling getResponseCode() on a non-HTTP 1.1 live stream response (e.g.  http://54.216.181.141:80/episode_7192278)
can result in the method not returning.  Instead it just reads the stream 

# telnet 54.216.181.141 80
GET /episode_7192278 HTTP/1.1

ICY 200 OK
Connection: Close
Content-Type: audio/mpeg
icy-notice1: Spreaker
icy-notice2: Create your own radio at www.spreaker.com
icy-genre: 
icy-pub: 1
icy-br: 128
Pragma: pipeline-result=0

?-Ş8)ሀA??b?;????????????\?r?? P3X>??????!XZ??@|????|x>???h=??????n7?]@?S/?2??(C7??
etc
etc
etc


Suggest that DefaultHttpResponseParser implement its reject method a little less leniently.
 e.g. 

                    protected boolean reject(final CharArrayBuffer line, final int count)
{
                        if(line.isEmpty() && count>0) {
                            return true;
                        }
                        if(count>100) {
                            return true;
                        }
                        return false;
                    }




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message