Skip to content

aws_sigv4: qsort - #23624

Closed
bagder wants to merge 4 commits into
masterfrom
bagder/aws_sigv4
Closed

bagder wants to merge 4 commits into
masterfrom
bagder/aws_sigv4

Conversation

@bagder

@bagder bagder commented Oct 26, 2026

Copy link
Copy Markdown
Member

New attempt with a "stable" qsort.

And use a stack buffer instead of malloc when sorting few headers.

This comment was marked as resolved.

Comment thread lib/http_aws_sigv4.c Outdated
for(l = head; l; l = l->next)
++n;
if(n > 1) {
if(n < SORT_HEADERS_STACK_MAX)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit - n <= SORT_HEADERS_STACK_MAX would also work right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ah yes!

@bagder
bagder marked this pull request as ready for review October 27, 2026 07:30
@bagder
bagder requested a balanced review from Copilot October 27, 2026 07:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes preserve header ordering and ownership, handle allocation failures, and have no identified blocking issues.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@bagder bagder closed this in dfdae2e Oct 27, 2026
@bagder
bagder deleted the bagder/aws_sigv4 branch October 27, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants