Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
* Implement `GetRejectedConnectionsCount`
* Implement test for `GetRejectedConnectionsCount`
|
|
|
|
gofmt -w -r "interface{} -> any" -l .
|
|
|
|
|
|
* Auto add 'Vary' header after compression
Add config `SetAddVaryHeaderForCompression` to enable
'Vary: Accept-Encoding' header when compression is used.
* feat: always set the Vary header
* create and use `ResponseHeader.AddVaryBytes`
* not export 'AddVaryBytes'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Replace https://godoc.org with https://pkg.go.dev.
- Replace https://golang.org with https://go.dev.
- Replace https://golang.org/pkg with https://pkg.go.dev.
- Replace https://blog.golang.org with https://go.dev/blog.
- Use https://pkg.go.dev/golang.org/x/net/http2 instead of non-existing https://http2.golang.org/.
- Remove trailing slashes.
|
|
See https://github.com/golang/go/wiki/CodeReviewComments#initialisms
and https://go.dev/doc/effective_go#mixed-caps
|
|
|
|
The serverName atomic.Value field is used as a cache. This is not needed and logic can be simplified.
See related #1458
|
|
|
|
|
|
Co-authored-by: rocketlaunchr-cto <rocketlaunchr.cloud@gmail.com>
|
|
* 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) .
|
|
Don't run requests in a separate Goroutine anymore. Instead use proper
conn deadlines to enforce timeouts.
- Also contains some linting fixes.
|
|
Header.SetCanonical() (#1311)
* Response.ContentEncoding(): store as field
The CE is not so often used for plain APIs responses and even not so often used for static files and on the fly compression.
But still it should be checked each time.
Also having a dedicated field getter and setter simplifies code
* header.go Use shorter Response.setNonSpecial() and Request.setNonSpecial() methods instead of SetCanonical()
The change should improve performance because the setSpecialHeader() call is omitted.
As a downside on adding a new basic header field all putHeader() must be replaced with a direct getter and setter.
|
|
Mostly in tests.
|
|
* Fix windows tests
Just ignore /../ tests on windows until we have proper suppor.
* Remove useless test code
This code was basically just testing if tcp works. To test if
SO_REUSEPORT works we only have to try to listen on the same addr:port
twice.
* Fix test
|
|
* fix(hijack): reuse RequestCtx
* fix(test/hijack): increase wait time
* fix(test/hijack): wait for all connections to finish to check responses
|
|
* fix(hijack): reset userValues after hijack handler execution
* feat: add test
* fix: typo
* fix(test): race condition
|
|
|
|
|
|
* Add trailer support
* fix issue and add documentation
* remove redundant code
* add error return for add/set trailer method
* fix lint error
* fix bad trailer error return issue and update bad content-length error
* update errNonNumericChars
* update errNonNumericChars
* fix issue about error and fix typo
|
|
* fix: reset request after reset user values on keep-alive connections
* test: add test for reset request after reset user values
|
|
* feat: close idle connections when server shutdown
* Fix redundant code
* Update test
* Update test
|
|
* uri: isHttps() and isHttp()
Use them instead of manual schema comparison
* uri: use SetSchemeBytes()
|
|
* Don't run all race tests on windows
It's too slow and gives a lot of false positives in our tests.
* No FS tests on windows
|
|
|
|
* Fix various Windows Github Action errors
These tests keep giving errors because Windows Actions are slower.
* Remove some timeouts
We don't need timeouts in all tests, only in the ones where we are
actually testing timeout logic.
|
|
Github workers on windows are slow.
|
|
* Add Go 1.17 support
* Increase test timeouts
|
|
|
|
|
|
* Flush buffered responses if we have to wait for the next request
Don't wait for the next request as this can take some time, instead
flush the outstanding responses already.
Fixes #1043
* Only peek 1 byte
Make sure old clients that send bogus \r\n still work.
See: https://github.com/golang/go/commit/bf5e19fbaf02b1b25fbe50c27ec301fe830a28d0
|
|
And TestFSCompressConcurrent timeout
|
|
|
|
|
|
* fix: set content-length properly when StreanRequestBody was enabled
* fix: add test cases for validating content length of streaming request
|
|
* Add option for middleware to set custom remote address
* Update Init2 to clear custom context remoteAddr
|
|
- Allow DisablePreParseMultipartForm in combination with
StreamRequestBody.
- Support streaming into MultipartForm instead of reading the whole body
first.
- Support calling ctx.PostBody() when streaming is enabled.
|
|
* fix gracefilly shutdown bug, issue #958
* fix golangci-lint
* add option: CloseOnShutdown into Sever
* Update server.go
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
* Update server.go
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
Co-authored-by: fujianhao3 <fujianhao3@jd.com>
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
|
|
* Add request body streaming. Fixes #622
* Add test cases for StreamRequestBody
Co-authored-by: Kiyon <kiyonlin@163.com>
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
Co-authored-by: Fiber
|