Leif Hedstrom created TS-2577:
---------------------------------
Summary: Tracing on e.g. -T http_hdrs does not show Proxy Request
headers accurately
Key: TS-2577
URL: https://issues.apache.org/jira/browse/TS-2577
Project: Traffic Server
Issue Type: Bug
Reporter: Leif Hedstrom
In particular, if a plugin changes some proxy request headers in a
TS_HTTP_SEND_REQUEST_HDR_HOOK, the tracer will show the header as it was
*before* the plugin hooks are invoked.
This seems wrong, and makes it difficult to debug plugin behavior. It should
clearly produce the header output *after* the plugin hook. In my case, the
produced output from -T http_hdrs is
{code}
+++++++++ Proxy's Request +++++++++
-- State Machine Id: 0
GET /foo/bar.jpg HTTP/1.1
User-Agent: curl/7.32.0
Accept: */*
Host: host.example.com
Client-ip: 127.0.0.1
X-Forwarded-For: 127.0.0.1
{code}
However, my plugin is injecting both a Date: and an Authorization: header in a
TS_HTTP_SEND_REQUEST_HDR_HOOK hook, which the origin does get. In the tracer, a
later header dump shows the expected header, but it's not particularly sensical
that it is shown after the request and origin response.
{code}
+++++++++ Cached Request Hdr +++++++++
-- State Machine Id: 0
GET http://host.example.com/foo/bar.jpg HTTP/1.1
User-Agent: curl/7.32.0
Accept: */*
Host: host.example.com
Client-ip: 127.0.0.1
X-Forwarded-For: 127.0.0.1
Date: Wed, 19 Feb 2014 21:17:29 +0000
Authorization: AWS my-key:xxxxxxxxxxxxxxxxxxxx=
{code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)