-
Notifications
You must be signed in to change notification settings - Fork 50
Url follow ups
#491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Url follow ups
#491
Conversation
... since it's not used.
.. instead of using an `std::io::Error`
e70138a to
5b1ab4c
Compare
|
Rebased after #467 landed. |
| } | ||
| } | ||
|
|
||
| #[cfg(feature = "std")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change led me to create #492
tcharding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 5b1ab4c
TheBlueMatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you address #467 (comment) ?
Also we currently still export a pub type URL = String; in src/request.rs. We can't drop it because we don't really want to bump the minor version, but it might be worth marking it deprecated?
Done.
Now opened #497, opted not to mark deprecate to avoid annoying warnings until then. |
TheBlueMatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 721e7ee
721e7ee to
1c71760
Compare
|
Force-pushed with the following changes: > git diff-tree -U2 721e7ee2 fe729039
diff --git a/bitreq/fuzz/src/url_parse.rs b/bitreq/fuzz/src/url_parse.rs
index ae74a65d..722a3c3b 100644
--- a/bitreq/fuzz/src/url_parse.rs
+++ b/bitreq/fuzz/src/url_parse.rs
@@ -112,5 +112,6 @@ pub fn do_test(data: &[u8]) {
let mut url_clone = bitreq_url.clone();
url_clone.preserve_fragment_from(&url_with_frag);
- let _ = url_clone.fragment();
+ let new_frag = url_clone.fragment().unwrap();
+ assert_eq!(new_frag, "testfrag");
let _ = url_clone.as_str();
}
@@ -126,4 +127,5 @@ pub fn do_test(data: &[u8]) {
url_clone3.preserve_fragment_from(&url_no_frag);
let _ = url_clone3.as_str();
+ assert_eq!(url_clone2.fragment(), url_clone3.fragment());
}
} |
Add a `pub_if_fuzzing!` macro that conditionally sets method visibility to `pub` when `cfg(fuzzing)` is set, and `pub(crate)` otherwise. This allows the fuzzer to exercise these internal methods without exposing them in the public API. The fuzzer now tests both methods with various inputs including: - Arbitrary fuzz input as key/value pairs - Empty strings - Multiple sequential parameter appends - Fragment preservation from URLs with and without fragments Co-Authored-By: HAL 9000
…ator Replace the single-param `append_query_param` with `append_query_params` which accepts an `impl IntoIterator<Item = (String, String)>`, building the full serialization in one pass and calling `parse_inner` only once. This eliminates the `for` loop in `ParsedRequest::new`. Co-Authored-By: HAL 9000
1c71760 to
fe72903
Compare
TheBlueMatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fe72903
|
Oops looks like tests are failing now. |
Fixed, was just a (pre-existing) overly strict test case. |
3a9ee19 to
f2a579f
Compare
Signed-off-by: Elias Rohrer <dev@tnull.de>
f2a579f to
8e8e408
Compare
TheBlueMatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 8e8e408
Just addressing some non-blocking follow-ups from #467.
(hence currently also based on #467)