docs: add call condition note for TSUrlHostGet#13313
Conversation
Add a note to the TSUrlHostGet documentation indicating that it should only be called after TS_HTTP_POST_REMAP_HOOK. For earlier hooks like TS_HTTP_READ_REQUEST_HDR_HOOK, TSHttpHdrHostGet should be used instead. Fixes apache#5742
|
Hello! This is my first contribution to Apache Traffic Server. Could you please trigger CI for this documentation PR? Thank you! |
|
@bneradt The Docs job failed due to warnings (warnings are treated as errors), but the warnings I found were related to env files. I'm not sure what the issue was. Could you take a look? |
|
From the docs build: |
|
Hi, just checking in on this docs PR. It adds a call condition note for TSUrlHostGet. Would appreciate a review when you have time. Thanks! |
Thank you for contributing, however you likely won't get a review until the docs build passes. Please see my previous comment showing the failure output. |
Replace :data: with double backticks for hook names, consistent with the rest of the documentation. Fixes apache#5742
|
Hi @bneradt, I've fixed the |
|
@mmustafasenoglu Once you are authorized to start Jenkins jobs (@bneradt added you to the whitelist) they will start automatically when you open a PR or push to it. |
|
Hi! Just following up on this documentation PR. Added a call condition note for TSUrlHostGet specifying it should only be called after TS_HTTP_POST_REMAP_HOOK. Let me know if any adjustments are needed. Thanks! |
|
I left a comment in the linked issue. @jpeach had expressed the understanding that |
|
You are entirely correct that the However, the confusion usually stems from the transaction lifecycle in a reverse proxy setup. When a client sends a standard relative URI request (e.g., I can update the PR documentation to make this distinction clearer: that while the API operates on any valid buffer, extracting the host from a client request transaction may require waiting until post-remap if relying on the URL instead of the Host header. Let me know if you would like me to adjust the wording this way! |
|
I noticed the docs build failed with Could this be a pre-existing issue in the docs build environment, or should I change the RST syntax in the note? I can simplify it to use plain monospace text instead of Also, I've responded to the technical question on #5742 about whether |
|
Hi @JosiahWI and @bryancall, I see that #5742 has been closed as not planned. I understand that the premise of my docs change may no longer align with the project's understanding of the API. I'm happy to close this PR if it's no longer needed. Thank you for taking the time to review it. |
|
@mmustafasenoglu Thank you for explaining the situation with the |
Summary
Add a note to the TSUrlHostGet documentation indicating that it should only be called after TS_HTTP_POST_REMAP_HOOK.
Changes
Why
Without this note, developers may try to use TSUrlHostGet in hook phases where it won't work correctly, leading to unexpected behavior.
Fixes #5742