You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2016/01/11 12:37:39 UTC
[jira] [Commented] (HTTPCLIENT-1711) defaulthttpresponseparser
parseHead fails to return on live stream
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15091805#comment-15091805 ]
Oleg Kalnichevski commented on HTTPCLIENT-1711:
-----------------------------------------------
Peter,
the point of having #reject method is that one can override it and use a custom DefaultHttpResponseParser extension in place of the one used by default. Can we really be sure that 100 represents a sensible default for all possible scenarios?
Oleg
> 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
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> 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