You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org> on 2012/01/16 23:07:39 UTC

[jira] [Commented] (TS-998) Broken ClientReq in TSAPI

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

Leif Hedstrom commented on TS-998:
----------------------------------

So, I'm not sure I like this approach. What are the advantages here of making a "stringified" copy of the pristine request headers, instead of making a copy of the request object? If we made a copy of the original request object, and leave it immutable ("static"), we can keep using the normal APIs for getting headers etc. out of it, no? In a similar fashion, we already have TSHttpTxnPristineUrlGet(). So, we'd add something like TSHttpTxnPristineReqGet() or some such.
                
> Broken ClientReq in TSAPI
> -------------------------
>
>                 Key: TS-998
>                 URL: https://issues.apache.org/jira/browse/TS-998
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 3.0.1
>         Environment: any
>            Reporter: Nick Kew
>            Assignee: Nick Kew
>             Fix For: 3.1.2
>
>
> Extracting a Request using TSHttpTxnClientReqGet API yields a bogus Request line.
> Expected behaviour: In a PRE_REMAP hook it should return the client request line and headers, ideally verbatim.
> Observed behaviour: "http://" is prepended to the request URL:
>   GET /path/ HTTP/1.1
> becomes
>   GET http:///path/ HTTP/1.1
> (yes, that's three slashes)
> Pseudo-code to reproduce from a PRE_REMAP hook:
>   TSHttpTxnClientReqGet(txnp, &buf, &hdr);
>   TSHttpHdrPrint(buf, hdr, iobuf);
>   reader = TSIOBufferReaderAlloc(iobuf);
>   block = TSIOBufferReaderStart(reader);
>   len = TSIOBufferBlockReadAvail(block, reader);
>   data = TSIOBufferBlockReadStart(block, reader, &len);
> Now examine the contents of data.
> Assigned to AMC as suggested yesterday on-list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira