[
https://issues.apache.org/jira/browse/TS-998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187287#comment-13187287
]
Nick Kew commented on TS-998:
-----------------------------
Hang on! All this patch is doing in my tests is to keep a pointer to the buf
in url_parse. I'm not sure when copy_strings is required, but I haven't
encountered it in any test. AFAICS the most expensive operation in the patch
is the strstr !
My memory could be at fault here, but I think I encountered the same bug with
PristineUrlGet as first reported: namely an incorrectly-reconstructed URL.
Unfortunately an instant-test of it on reading your comment fails a sanity
check ( *url_loc is NULL), and it's the time of evening when I'm going to run
around in fruitless circles if I dig deeper.
> 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