fix: support CONNECT and absolute-form parsing with http >= 1.4.1#912
fix: support CONNECT and absolute-form parsing with http >= 1.4.1#912SameerVers3 wants to merge 1 commit into
Conversation
55667e9 to
41fef7e
Compare
|
(with a similar caveat as my issue re: LLM-assistance, plus me not having access to Thanks for picking this up so quickly — the One note about the non-UTF-8 path: The lossy branch now routes through let raw_path = b"Hello\xF0\x90\x80World"; // invalid UTF-8, no leading slash
let req = RequestHeader::build("GET", &raw_path[..], None).unwrap();
assert_eq!("Hello\u{FFFD}World", req.uri.path_and_query().unwrap());Previously I can't verify directly since I'm on the stock |
|
Yes, you are right, I missed that. Thanks for pointing it out! I'll keep using the original path_and_query() builder for the lossy branch to preserve the path-form behavior. |
41fef7e to
507cbad
Compare
|
Yeah, that seems more correct! One nit, I think this is now a bit stale: Maybe it's "raw target bytes used when serializing, set for non-UTF-8 paths and for URIs with no path-and-query (authority-form / absolute-form without a path)"? |
|
Good catch! I will update the comment |
507cbad to
066363f
Compare
Fix HTTP/1 CONNECT and absolute-form request parsing failures when using http crate >= 1.4.1.
Changes:
set_raw_path().raw_path()to avoid panics.Fixes #909