test: expand coverage for raw argument collections#1545
Merged
Conversation
Co-authored-by: fzipi <3012076+fzipi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add raw argument collections for non-URL-decoded values
test: expand coverage for raw argument collections
Mar 9, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/args_raw #1545 +/- ##
=================================================
+ Coverage 86.06% 86.14% +0.08%
=================================================
Files 175 175
Lines 8692 8692
=================================================
+ Hits 7481 7488 +7
+ Misses 964 958 -6
+ Partials 247 246 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fzipi
approved these changes
Mar 11, 2026
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.
Test coverage for the new raw argument collections (
ARGS_GET_RAW,ARGS_POST_RAW,ARGS_NAMES_RAW,ARGS_GET_NAMES_RAW,ARGS_POST_NAMES_RAW,ARGS_RAW) was thin. This adds comprehensive unit and integration tests across all layers.internal/urlParseQueryBoth: plus-sign handling, multi-value keys, empty inputParseQueryRaw: multi-value keys, empty inputinternal/corazawaf(transaction)ExtractGetArgumentspopulatesargsGetRawwith raw percent-encoding whileargsGetholds decoded valueshello+world) vs decoded in cooked (hello world)%2500raw vs%00cooked)argsGetNamesRawretains raw key names (p%61ramnotparam)addGetRequestArgumentRawinternal/bodyprocessorsArgsPost(decoded) andArgsPostRaw(raw)ArgsPostRawpopulated identically toArgsPost(multipart fields are not URL-encoded)testing/engine(integration)Three new test cases in
args_raw.go:ARGS_GET_NAMES_RAWpreserves raw GET parameter namesARGS_POST_NAMES_RAWpreserves raw POST parameter namesARGS_GET_RAWwith multiple values for the same key (color=red&color=gr%65en&color=blue)💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.