Skip to content

Conversation

@tnull
Copy link
Collaborator

@tnull tnull commented Feb 3, 2026

Just addressing some non-blocking follow-ups from #467.

(hence currently also based on #467)

@tnull tnull force-pushed the 2026-02-url-follow-ups branch from e70138a to 5b1ab4c Compare February 4, 2026 08:18
@tnull
Copy link
Collaborator Author

tnull commented Feb 4, 2026

Rebased after #467 landed.

}
}

#[cfg(feature = "std")]
Copy link
Member

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
tcharding previously approved these changes Feb 4, 2026
Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5b1ab4c

@tnull tnull moved this to Goal: Merge in Weekly Goals Feb 5, 2026
@tnull tnull self-assigned this Feb 5, 2026
Copy link
Member

@TheBlueMatt TheBlueMatt left a 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?

@tnull
Copy link
Collaborator Author

tnull commented Feb 9, 2026

Can you address #467 (comment) ?

Done.

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?

Now opened #497, opted not to mark deprecate to avoid annoying warnings until then.

TheBlueMatt
TheBlueMatt previously approved these changes Feb 9, 2026
Copy link
Member

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 721e7ee

@tnull
Copy link
Collaborator Author

tnull commented Feb 9, 2026

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());
                 }
             }

tnull added 2 commits February 9, 2026 18:45
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
@tnull tnull force-pushed the 2026-02-url-follow-ups branch from 1c71760 to fe72903 Compare February 9, 2026 17:45
TheBlueMatt
TheBlueMatt previously approved these changes Feb 9, 2026
Copy link
Member

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fe72903

@TheBlueMatt
Copy link
Member

Oops looks like tests are failing now.

@tnull
Copy link
Collaborator Author

tnull commented Feb 9, 2026

Oops looks like tests are failing now.

Fixed, was just a (pre-existing) overly strict test case.

@tnull tnull force-pushed the 2026-02-url-follow-ups branch from 3a9ee19 to f2a579f Compare February 9, 2026 18:43
Signed-off-by: Elias Rohrer <dev@tnull.de>
@tnull tnull force-pushed the 2026-02-url-follow-ups branch from f2a579f to 8e8e408 Compare February 9, 2026 19:12
Copy link
Member

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 8e8e408

@tcharding tcharding merged commit 24dd7eb into rust-bitcoin:master Feb 9, 2026
31 checks passed
@github-project-automation github-project-automation bot moved this from Goal: Merge to Done in Weekly Goals Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants