forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make //net/server request parsing less inefficient
Reduce the number of copies performed on each byte of the input in net::HttpServer::ParseHeaders by one by tracking the start position of each token. Also eliminates some unnecessary bounds checking in std::string::push_back and some allocations for longer tokens. Disallow null bytes in headers as code may not handle them correctly. Also fix some minor style guide violations. Doesn't attempt to modernize the interface as that will be done by the spanification effort soon. Also doesn't attempt to fix the design flaw of reparsing the headers every time a packet is received. Change-Id: I4e470398723e10ce663bc85038db146c2baf1469 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5831550 Reviewed-by: mmenke <[email protected]> Commit-Queue: Adam Rice <[email protected]> Cr-Commit-Position: refs/heads/main@{#1357503}
- Loading branch information
Showing
2 changed files
with
102 additions
and
49 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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