Repository navigation
Conversation
Handle HTTP/1.0 and its lowercase HAR representation explicitly rather than silently upgrading requests and responses to HTTP/1.1. Co-authored-by: generaltony007 <[email protected]>
Test both request and response versions, HTTP/1.0 case variants, existing HTTP/1.1/2/3 and empty-version compatibility, and export-to-FlowReader round trips. Co-authored-by: generaltony007 <[email protected]>
Note the recorded-protocol preservation fix for HAR imports. Co-authored-by: generaltony007 <[email protected]>
Contributor
Author
|
Could you take a look at this HTTP/1.0 HAR round-trip fix when you have time? The current head has passing test, lint, type, coverage and build checks; the deployment jobs are skipped. There are no review comments to address yet. Please let me know if any changes are needed before this can be considered for merge. Thanks. |
Contributor
Author
|
Hi, would you have time to review this HTTP/1.0 HAR import fix? If there's anything you'd like changed before review, I'm happy to address it. Thanks. |
2 tasks done
Contributor
Author
|
Could a maintainer review the HTTP/1.0 HAR import fix and let me know the next step? Please point out any changes needed before it can move forward, or let me know if you'd prefer it closed. Thanks. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
HAR imports currently turn HTTP/1.0 requests and responses into HTTP/1.1 because the version mapping falls through to its default. This also affects a HAR exported by mitmproxy itself: an HTTP/1.0 message no longer retains its recorded protocol when loaded through
FlowReader.Handle
HTTP/1.0andhttp/1.0explicitly for requests and responses. Existing HTTP/1.1, HTTP/2, HTTP/3, and empty-version fallback behavior is unchanged.Tests cover the version mapping on each side, check that changing one side does not alter the other, and exercise HTTP/1.0 through an actual
SaveHartoFlowReaderround trip.Validation against main
1d5d831c:uv run --no-sync tox -e lintand changed-file Ruff formatting checks pass.Tests use the existing development environment with
--no-sync; the newest main dependency lock was not reinstalled for the pytest runs.Checklist