Ron Barber created TS-2320:
------------------------------

             Summary: TSRedirectUrlSet truncates host header in redirected 
request 
                 Key: TS-2320
                 URL: https://issues.apache.org/jira/browse/TS-2320
             Project: Traffic Server
          Issue Type: Bug
          Components: HTTP
            Reporter: Ron Barber


The TSRedirectUrlSet(TSHttpTxn txnp, const char* url, const int url_len) 
function truncates the host header when making the OS request to the redirected 
URL.

Currently the experimental plugin custom_redirect appears to be the only user 
of this function.  Debug output from traffic.out show the intended redirect 
target as 'http://localhost/test.php?size=100&cache=30' but the HOST header is 
truncated to 'localhos':

+++++++++ Proxy's Response 2 +++++++++
-- State Machine Id: 1
HTTP/1.1 200 OK
Date: Tue, 05 Nov 2013 19:11:39 GMT
P3P: policyref="http://info.yahoo.com/w3c/p3p.xml";, CP="CAO DSP COR CUR ADM DEV 
TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL 
UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
x-redirect-url: http://localhost/test.php?size=100&cache=30
Cache-Control: private
Content-Length: 534
Content-Type: text/html; charset=UTF-8
Age: 0
Connection: keep-alive
Server: ATS/4.0.1

[Nov  5 13:11:39.449] Server {0x2b12f8f0e700} DEBUG: (http_redirect) 
[HttpSM::do_redirect]
[Nov  5 13:11:39.449] Server {0x2b12f8f0e700} DEBUG: (http_redirect) 
[HttpSM::redirect_request]
+++++++++ Framed Client Request..checking +++++++++
-- State Machine Id: 1
GET http://localhost/test.php?size=100&cache=30 HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 
zlib/1.2.3 libidn/1.18 libssh2/1.2.2
Accept: */*
Host: localhos+++++++++ Incoming Request +++++++++
-- State Machine Id: 1
GET http://localhost/test.php?size=100&cache=30 HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 
zlib/1.2.3 libidn/1.18 libssh2/1.2.2
Accept: */*
Host: localhos+++++++++ Proxy's Request +++++++++




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to