Skip to content

http header action, save cpu cycles - #13143

Closed
icing wants to merge 4 commits into
curl:masterfrom
icing:http-header-cycles
Closed

icing wants to merge 4 commits into
curl:masterfrom
icing:http-header-cycles

Conversation

@icing

@icing icing commented Mar 18, 2024

Copy link
Copy Markdown
Contributor

Saving some cpu cycles in http response header processing:

  • pass the length of the header line along
  • use string constant sizeof() instead of strlen()
  • check line length if prefix is possible
  • switch on first header char to limit checks

icing added 2 commits March 18, 2024 13:18
Saving some cpu cycles in http response header processing:
- pass the length of the header line along
- use string constant sizeof() instead of strlen()
- check line length if prefix is possible
- switch on first header char to limit checks
@icing icing added the HTTP label Mar 18, 2024
@icing
icing requested a review from bagder March 18, 2024 13:35
- try send the complete request directly without copying into
  the send buf first. Buffer the remained that could not be sent
  in on go.
@icing
icing force-pushed the http-header-cycles branch from adc4cfa to 8d5e367 Compare March 18, 2024 14:45
- initial sends contains also header bytes that should not
  be counted against blocked length
- fixes (hopefully) assertion failure in fuzzing
@bagder bagder closed this in 522ea54 Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants