Repository navigation
Conversation
- Batch contiguous unencoded characters into single curlx_dyn_addn() calls instead of invoking dynbuf append byte-by-byte - Inline lowercasing in absolute url parsing - Make junkscan pass over data only once instead of twice - Use lookup-table to validate hostname in hostname_check() - Improve needs_dedotdot with leading memchr calls for dots and percent - Replace a strcspn() call with a while loop - Replace several strchr with memchr - Detect IPv6 earlier and skip some logic - Skip the full URL junkscan: - allows for better return codes for where the problem lies - allows for proper support for the URLENCODE flag - runs a little faster This completes the perf test roughly 17% faster on my machine in debug mode.
bagder
force-pushed
the
bagder/urlparse-faster
branch
from
September 12, 2026 16:12
b5e992a to
764c0dc
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
It changes security-sensitive URL parsing and validation behavior across multiple URL components.
Pull request overview
Optimizes URL parsing while preserving component-specific validation and error reporting.
Changes:
- Batches URL-encoding operations and adds parser fast paths.
- Moves control-character validation to individual URL components.
- Updates URL API and HTTPS RR test expectations.
File summaries
| File | Description |
|---|---|
lib/urlapi.c |
Optimizes parsing and component validation. |
lib/vdns/doh.c |
Adds local hostname junk validation. |
tests/libtest/lib1560.c |
Updates URL parsing expectations. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
Author
|
augment review |
Member
Author
🔒 Aisle Security Analysis✅ Aisle scan complete — no security issues detected. Aisle supplements but does not replace security review. Last updated on: 2026-09-12T16:51:30Z |
🤖 Augment PR SummarySummary: This PR optimizes URL API parsing to reduce the runtime of the URL parser performance test. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
They need to be literal
bagder
marked this pull request as ready for review
September 12, 2026 17:02
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.
This completes the perf test roughly 17% faster on my machine.