You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Timur Irmatov (JIRA)" <ji...@apache.org> on 2012/10/10 08:19:03 UTC

[jira] [Commented] (TS-1465) Handling of HTTP 0.9 responses

    [ https://issues.apache.org/jira/browse/TS-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13473021#comment-13473021 ] 

Timur Irmatov commented on TS-1465:
-----------------------------------

Thinking more about it, I am not sure if proxy.config.http_send_http11_responses would really solve the problem. If such flag would exist and would be set to false (ie do not send http1.1) then would that mean that TS is free to send response as HTTP 1.0 or what?

The thing is that many radio streaming services use HTTP 0.9 and many client libraries (in Linux, at least) do not handle HTTP/1.1 and Chunked-encoding correctly. As TS skips cache as far as I can see from the code when origin server responds with HTTP/0.9, it would be far easier and simpler to just tunnel OS' response to client as-is without any HTTP/1.0 or 1.1 headers.

So my vote is for proxy.http.return_http09_as_is or proxy.http.tunnel_http09_reponses boolean flag with behaviour described above.

P.S. What does "Fix versions: 3.3.2" mean ?
                
> Handling of HTTP 0.9 responses
> ------------------------------
>
>                 Key: TS-1465
>                 URL: https://issues.apache.org/jira/browse/TS-1465
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: HTTP
>    Affects Versions: 3.2.0
>            Reporter: Timur Irmatov
>            Priority: Minor
>             Fix For: 3.3.2
>
>
> I have a following scenario:
> Apache Traffic Server is configured as forward proxy to access internet. (It can be either explicit configuration or transparent - same problem). Then, client (tested with linux music players MPD, Audacious, Rhythmbox) starts to play internet radio, http://scfire-dtc-aa04.stream.aol.com/stream/1065 for example. Origin server responds with HTTP 0.9, as fas as I understand. ATS sends to client HTTP/1.1 response with chunked encoding. Unfortunately, none of the aforementioned clients really understand HTTP/1.1 and chunked encoding in particular. This leads to audible music defect every second or so. Granted, these are bugs in those players, and I have reported it against one of them and am willing to do so for others.
> But, Squid proxy acting as transparent proxy forwards original servers' HTTP 0.9 repsonse back to client not modified at all (without upgrading it to HTTP/1.1 despite client request claims HTTP/1.1). So no problem. Is there a possibility to may be add configuration variable (something like proxy.http.return_http09_as_is) to mimic Squid's behaviour and return HTTP 0.9 response body as is, without any modifications or response version upgrade?
> This is request from curl and Squid's response:
> Request:
> GET /stream/1065 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: scfire-dtc-aa04.stream.aol.com
> Accept: */*
> Response:
> ICY 200 OK
> Date: Thu, 13 Sep 2012 05:03:31 GMT
> icy-notice1: <BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
> icy-notice2: Firehose Ultravox/SHOUTcast Relay Server/Linux v2.6.0<BR>
> icy-name: Vocal Trance - DIGITALLY IMPORTED - a fusion of trance, dance, and chilling vocals together!
> icy-genre: Electronic Trance Pop
> icy-url: http://www.di.fm/vocaltrance
> Content-Type: audio/mpeg
> icy-pub: 1
> icy-br: 96
> X-Cache: MISS from localhost
> X-Cache-Lookup: MISS from localhost:3128
> Connection: close
> <...then here audio data stream follows>
> This is same with ATS:
> Request:
> GET /stream/1065 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: scfire-dtc-aa04.stream.aol.com
> Accept: */*
> Response:
>  
> HTTP/1.1 200 Connection Established
> Date: Thu, 13 Sep 2012 05:34:13 GMT
> Transfer-Encoding: chunked
> Connection: keep-alive
> Server: ATS/3.2.0
>  
> ICY 200 OK
> Date: Thu, 13 Sep 2012 05:34:17 GMT
> icy-notice1: <BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
> icy-notice2: Firehose Ultravox/SHOUTcast Relay Server/Linux v2.6.0<BR>
> icy-name: Vocal Trance - DIGITALLY IMPORTED - a fusion of trance, dance, and chilling vocals together!
> icy-genre: Electronic Trance Pop
> icy-url: http://www.di.fm/vocaltrance
> Content-Type: audio/mpeg
> icy-pub: 1
> icy-br: 96
> Connection: close
> <... and then comes audio stream with chunked encoding ...>
> This is the only thing that keeps us from switching from Squid to ATS. Any workaround/ suggestions are very welcome. Squid crashes from time to time and uses only one CPU core, so we would really want to switch to ATS.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira