Erik Dubbelboer
7760a5b506
Validate request method
...
Use the same validation as net/http.
Fixes https://github.com/valyala/fasthttp/issues/1803
2024-07-14 09:43:40 +02:00
Erik Dubbelboer
b4c0b2b47d
Validate header values ( #1796 )
...
* Validate header values
Fixes https://github.com/valyala/fasthttp/issues/1794
* Don't allow empty header keys
And improve error handling for bad headers.
2024-07-03 10:04:04 +02:00
Erik Dubbelboer
7b273dc590
Don't allow \r in header names ( #1789 )
...
* Don't allow \r in header names
From RFC 9112:
A sender MUST NOT generate a bare CR (a CR character not immediately
followed by LF) within any protocol elements other than the content.
A recipient of such a bare CR MUST consider that element to be invalid
or replace each bare CR with SP before processing the element or forwarding
the message.
net/http seems to completely error on this, so let's do the same.
Fixes https://github.com/valyala/fasthttp/issues/1785
* Validate the full header field
2024-06-11 08:41:16 +02:00
nickajacks1
2accefa5cb
refactor: move manually created tchar table to bytesconv_table_gen ( #1689 )
2024-01-07 08:27:45 +01:00
Oleksandr Redko
7bd632cbde
chore: Remove redundant build constraint ( #1650 )
2023-11-08 23:18:13 +01:00
Oleksandr Redko
ffdf59d04c
Enable gofumpt linter; format code gofumpt -w . ( #1576 )
2023-06-13 15:18:59 +02:00
Oleksandr Redko
0be5a4150c
test: simplify bytes.Buffer declaration ( #1523 )
2023-03-18 14:40:25 +01:00
kinggo
2c8ce3b40e
feat: add header.PeekAll ( #1394 )
2022-10-15 15:47:53 +02: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
tyltr
ba401075d3
compatible with new build tag ( #1087 )
2021-09-02 00:18:53 +02:00
Erik Dubbelboer
af531ad4c0
Move comment to now show up on godoc
...
Comments above the package statement show up at the top of
https://godoc.org/github.com/valyala/fasthttp
2019-10-03 14:08:17 +02:00
ZhangYunHao
b1ca43febc
Use 'go generate' in bytesconv.go ( #663 )
...
* Add bytesconv_table_gen.go
2019-09-28 14:55:31 +02:00