13 Commits

Author SHA1 Message Date
Erik Dubbelboer f9d84d7c52 Rewrite header parsing to improve spec compliance (#2030)
This change updates header parsing to match the behavior of net/http more closely.

**Breaking change**: headers delimited by `\n` (instead of `\r\n`) are no longer supported.

Previously, fasthttp accepted `\n` as a delimiter, which is not spec compliant.
This made it difficult to correctly parse headers containing both `\n` and `\r\n`.
2025-08-12 15:49:35 +02:00
Erik Dubbelboer 1828bd4eee Optimize fs to have 0 allocations (#2052)
When using caching fs shouldn't cause any allocations.

Only do []byte to string conversions when really needed. When a file is
already cached the conversion shouldn't be needed.

Fixes https://github.com/valyala/fasthttp/issues/2045
2025-08-10 00:06:11 +02:00
Oleksandr Redko 7bd632cbde chore: Remove redundant build constraint (#1650) 2023-11-08 23:18:13 +01:00
Aoang a696949f6c Deprecate Go 1.15 (#1379)
* Dropping support for 1.15.

* Replaces Go 1.16 Deprecated functions

* Update test build flag

* Fix import sort and comment

* Update github.com/klauspost/compress to v1.15.9

https://github.com/klauspost/compress improved performance and changed Minimum version is 1.16, this should be the final supported release for Go 1.16 (https://github.com/klauspost/compress/commit/6d0019a95afa3221f7522d1f2eed0033b5e79470) .
2022-09-15 22:28:25 +03:00
Erik Dubbelboer 7a5afddf5b Use %v for errors and %q for strings (#1262)
Mostly in tests.
2022-04-01 18:11:16 +02:00
Erik Dubbelboer 542a203b42 Properly parse URI
Use URI parse code based on net/uri to validate hostnames.
2021-10-01 13:38:31 +02:00
tyltr ba401075d3 compatible with new build tag (#1087) 2021-09-02 00:18:53 +02:00
Erik Dubbelboer 9f2c63676d Lower go test time 2021-06-18 14:57:18 +02:00
Erik Dubbelboer 34a61fe63f Update linting (#851) 2020-07-17 14:22:28 +02:00
Erik Dubbelboer 32793db72d Run golangci-lint using a Github Action 2019-11-16 18:09:28 +01:00
Erik Dubbelboer c3d82ca3a4 Speed up testing by running tests in parallel 2019-10-16 10:20:13 +02:00
Erik Dubbelboer 2edabf3b76 Add support for user:pass in URLs (#614)
Fixes #609
2019-08-18 11:23:33 +02:00
Erik Dubbelboer 61039c93c2 Add zero allocation guarantee tests 2019-02-12 21:26:41 +01:00