Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
* client: simplify (*HostClient).do()
Remove an allocation in favour of deferring a call to release the
response.
* client: remove panic in dialAddr
Return an error instead of panicking if the user supplied a nonsensical
DialFunc.
* compression: remove panic on invalid compression level
If a compression level exceeding gzip's boundaries is provided, fasthttp
will panic. Instead it would be better to handle this error for them by
limiting it to the minimum or maximum value, depending on the direction
the user has exceeded the limits.
Clamp the value of gzip to always be between gzip.BestSpeed and
gzip.BestCompression.
* peripconn: remove panic on negative connection count
When a negative count is reached when unregistering a connection, a
panic is caused even though data-integrity is not at risk.
Replace the panic() with a simple clamp on the value to ensure the
value does not exceed it's expected lower bounds.
References: #1504
* compress: remove error on failed nonblocking writes
Since there is no way of handling or even logging non-critical errors in
stateless non-blocking writecalls, just drop them and hope the user
notices and tries again.
* workerPool: remove panic on redundant Start and Stop calls
Instead of panicking for invalid behaviour, it's preferable to just turn
the function into a noop.
* http: remove panic on invalid form boundary
* http: remove panic on negative reads
Since bufio already panics on negative reads, it is not necessary to do
so as well. If the length is zero and for some reason no error is
returned, readBodyIdentity and appendBodyFixedSize now errors in these
cases.
Link: https://github.com/golang/go/blob/851f6fd61425c810959c7ab51e6dc86f8a63c970/src/bufio/bufio.go#L246
* fs: remove panic on negative reader count
When a negative count is reached when unregistering a reader, a panic is
thrown even though data-integrity is not at risk.
Replace the panic() with a simple clamp on the value to ensure the
value does not exceed it's expected lower bounds.
* server: remove panic in favour of a segfault
Panicking with "BUG: " obscures the error. As the segfault causes a
panic anyway, just let the chaos unfold.
* server: remove panic in favour of returning an error
Writing on a timed-out response is not endangering data integrity and
just fails.
* chore: add comments to all panics
* chore: fix minor typo
|
|
|
|
|
|
* chore-1
* chore2
|
|
|
|
|
|
|
|
|
|
* Remove useless runtime.KeepAlive
* Update bytesconv.go
|
|
|
|
Ensure `len(b)` <= `cap(b)` at all times. Additionally, use `runtime.KeepAlive()` to prevent `s` from being GC-ed.
|
|
|
|
* Add more tests for parseUintBuf()
* Fix integer overflow handling in parseUintBuf()
|
|
* feat: workflow to valid security using GoSec
* Update security.yml
* Fix gosec problems
These are all either false positives or os.Open operations done on
filenames supplied by the fasthttp user which we have to assume is safe.
* Just ignore some rules globally
* Fix more warnings
* No more warnings
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
|
|
|
|
* Add bytesconv_table_gen.go
|
|
|
|
|
|
|
|
|
|
* Update bytesconv.go
* Modify tests
* Remove unnecessary comments
* Update args_test.go
* Add test for appendQuotedPath
* Fix 11202 issue
* Fix some problems
|
|
* Use pointer for smaller stack space
|
|
|
|
Fixes #461
|
|
Found using https://go-critic.github.io/overview#deprecatedComment-ref
|
|
|
|
|
|
Typo fixes
|
|
specially crafted string like "%\xff"
|
|
|
|
Benchmark results on linux/amd64:
name old time/op new time/op delta
ArgsParse-4 72.8ns ± 2% 68.0ns ± 2% -6.59% (p=0.000 n=10+9)
AppendUnquotedArgFastPath-4 20.4ns ± 2% 21.1ns ± 9% ~ (p=0.614 n=8+10)
AppendUnquotedArgSlowPath-4 68.9ns ± 3% 70.4ns ± 6% ~ (p=0.148 n=9+10)
URIParsePath-4 80.9ns ± 2% 78.7ns ± 2% -2.80% (p=0.000 n=10+10)
URIParsePathQueryString-4 88.9ns ± 1% 86.3ns ± 1% -2.90% (p=0.000 n=10+8)
URIParsePathQueryStringHash-4 95.7ns ± 8% 91.0ns ± 1% -4.88% (p=0.000 n=9+10)
URIParseHostname-4 98.6ns ± 1% 95.4ns ± 1% -3.24% (p=0.000 n=10+10)
|
|
|
|
Performance results on amd64:
name old time/op new time/op delta
NormalizeHeaderKeyCommonCase-4 43.3ns ± 0% 32.6ns ± 1% -24.80% (p=0.000 n=9+10)
NormalizeHeaderKeyLowercase-4 42.6ns ± 3% 32.6ns ± 1% -23.41% (p=0.000 n=10+10)
NormalizeHeaderKeyUppercase-4 43.5ns ± 1% 32.6ns ± 2% -25.03% (p=0.000 n=9+8)
Based on top of https://github.com/valyala/fasthttp/pull/279 .
|
|
chars
|
|
|
|
https://github.com/kataras/iris/issues/173)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fail on systems without certain config files
|
|
http://www.w3.org/TR/html5/forms.html#form-submission-algorithm
|
|
|
|
|