Commit 758271a
http: optimize checkIsHttpToken for short strings
Use lookup table instead of regex for strings shorter than 10
characters to improve performance for common short header names
while maintaining compatibility.
PR-URL: #59832
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>1 parent a71dd59 commit 758271aCopy full SHA for 758271a
File tree
Expand file treeCollapse file tree
1 file changed
+37
-1
lines changedOpen diff view settings
Filter options
- lib
Expand file treeCollapse file tree
1 file changed
+37
-1
lines changedOpen diff view settings
Collapse file
+37-1Lines changed: 37 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
24 | 24 | |
25 | 25 | |
26 | 26 | |
| 27 | + |
27 | 28 | |
28 | 29 | |
29 | 30 | |
| ||
205 | 206 | |
206 | 207 | |
207 | 208 | |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | + |
208 | 213 | |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | + |
209 | 233 | |
210 | 234 | |
211 | 235 | |
212 | 236 | |
213 | 237 | |
214 | 238 | |
215 | | - |
| 239 | + |
| 240 | + |
| 241 | + |
| 242 | + |
| 243 | + |
| 244 | + |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
| 250 | + |
| 251 | + |
216 | 252 | |
217 | 253 | |
218 | 254 | |
|
0 commit comments