feat: add task ID response header in Dragonfly client proxy #1256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces changes to enhance the handling of response headers in the
dragonfly-client
by adding support for a new task ID header and updating relevant functions to incorporate this header. The changes primarily focus on improving the clarity and functionality of the response headers.Enhancements to response header handling:
Added a new response header constant: Introduced
DRAGONFLY_TASK_ID_HEADER
to represent the task ID in response headers, along with documentation explaining its purpose. (dragonfly-client/src/proxy/header.rs
, dragonfly-client/src/proxy/header.rsL82-R90)Updated
make_response_headers
function: Modified the function to accept atask_id
parameter and include theDRAGONFLY_TASK_ID_HEADER
in the response headers. (dragonfly-client/src/proxy/mod.rs
, [1] [2]Refactoring to integrate the new header:
proxy_via_dfdaemon
function: Updated the function to pass thetask_id
tomake_response_headers
for constructing the response headers. (dragonfly-client/src/proxy/mod.rs
, dragonfly-client/src/proxy/mod.rsL771-R774)Related Issue
Motivation and Context
Screenshots (if appropriate)