Repository navigation
api sort - #2959
api sort#2959
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v2.16 #2959 +/- ##
==========================================
+ Coverage 68.95% 69.04% +0.08%
==========================================
Files 137 137
Lines 34671 34799 +128
==========================================
+ Hits 23909 24026 +117
- Misses 10762 10773 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d73014fe1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| neu_http_get_param_str(aio, "sort_by", sort_by, sizeof(sort_by)); | ||
| if (sort_len != -2) { | ||
| neu_tag_cmp_fn cmp = | ||
| sort_len >= 0 && (size_t) sort_len < sizeof(sort_by) | ||
| ? neu_tag_get_sort_cmp(sort_by) |
There was a problem hiding this comment.
Preserve the ascending sign when parsing GET sorts
When a caller uses the accepted ascending spelling directly in the GET URL, for example ?sort_by=+name, neu_http_get_param_str passes it through neu_url_decode, which rewrites the literal + to a space (src/utils/http.c:75-76); neu_tag_get_sort_cmp then receives " name" and this path returns NEU_ERR_PARAM_IS_WRONG. Thus ascending GET sorting only works if clients happen to percent-encode the sign as %2B, while the equivalent JSON API accepts +name as-is; preserve or normalize the leading sign before validating this parameter.
Useful? React with 👍 / 👎.
No description provided.