Timur Irmatov created TS-1465:
---------------------------------

             Summary: 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


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 reponse 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 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

Reply via email to