aboutsummaryrefslogtreecommitdiff
path: root/header_timing_test.go
AgeCommit message (Collapse)AuthorFilesLines
2024-01-02feat: add function to parse HTTP header parameters (#1685)Gravatar nickajacks1 1-0/+13
* feat: add function to parse HTTP header parameters The implementation is based on RFC-9110 5.6.6. * test: add fuzz for VisitHeaderParams
2023-12-13chore: Add missing dots at the end of comments (#1677)Gravatar Oleksandr Redko 1-5/+5
2023-06-13Enable gofumpt linter; format code `gofumpt -w .` (#1576)v1.48.0Gravatar Oleksandr Redko 1-1/+1
2022-06-06header.go Referer() optimize (#1313)Gravatar Sergey Ponomarev 1-7/+39
* args.go GetBool(): use switch with string casting This should be optimized by Go compiler itself so the b2s() call is not needed. It was previously done by this but changed in 1e7885eb56cdf4c6f550e143b0dbd3acc82a4137 * header.go Referer() optimize Use direct peekArgBytes() instead of PeekBytes() that will check for special headers * header_timing_test.go BenchmarkRequestHeaderPeekBytesSpecialHeader The old BenchmarkRequestHeaderPeekBytesCanonical and BenchmarkRequestHeaderPeekBytesNonCanonical are in fact just measured the header normalization. But it's anyway is benchmarked separately. Results was almost the same: 1.5 ns/op. Instead, let's reuse the benches to find a difference between peeking of special (Host, CT) and custom headers.
2022-04-01Use %v for errors and %q for strings (#1262)v1.35.0Gravatar Erik Dubbelboer 1-4/+4
Mostly in tests.
2021-09-06feat: improve IsMethod (#1088)Gravatar tyltr 1-0/+9
* feat: improve bytesEqual * benchmark * nolint:unused * remove unused code * Update client.go Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com> Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
2020-12-09fix issue #875 (#909)v1.18.0Gravatar Kirill Danshin 1-0/+32
* 🐞 panic in fs.go #824 * fix issue #875 Signed-off-by: Kirill Danshin <kirill@danshin.pro> * improve issue 875 Co-authored-by: Fenny <fenny@gofiber.io> * Update header.go * Update header.go Co-authored-by: Kirill Danshin <kirill@danshin.pro> * remove foldReplacer * Improve removeNewLines Start replacing at the first character found, use bytes.Indexbyte to make the function signature more logical. Both bytes.indexByte and strings.IndexByte use exactly the same code: https://github.com/golang/go/blob/0c703b37dffe74d3fffc04347884bb0ee2fba5b3/src/internal/bytealg/indexbyte_amd64.s#L8-L20 Co-authored-by: wernerr <rene.werner@verivox.com> Co-authored-by: wernerr <rene@gofiber.io> Co-authored-by: Fenny <fenny@gofiber.io> Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
2018-10-01Remove fasthttp.ByteBufferGravatar Erik Dubbelboer 1-2/+4
As advertised in https://github.com/valyala/fasthttp/commit/b5f96d4b4120bb1e09c23ac32baf21a14da4a71d
2016-02-25Issue #57: Server: added ability to disable header names' normalizingGravatar Aliaksandr Valialkin 1-1/+1
2016-02-12Switch from bytes.Buffer to ByteBuffer where appropriateGravatar Aliaksandr Valialkin 1-2/+2
2015-11-30Added benchmarks for normalizeHeaderKeyGravatar Aliaksandr Valialkin 1-0/+25
2015-11-22gofmtGravatar Aliaksandr Valialkin 1-2/+2
2015-11-22Added tests for Header.WriteGravatar Aliaksandr Valialkin 1-0/+35
2015-11-17Run header benchmarks in parallelGravatar Aliaksandr Valialkin 1-37/+45
2015-11-05Added benchmarks for header readingGravatar Aliaksandr Valialkin 1-2/+49
2015-10-28Added benchmarks for obtaining header values for normalized and ↵Gravatar Aliaksandr Valialkin 1-0/+31
non-normalized keys