aboutsummaryrefslogtreecommitdiff
path: root/strings.go
AgeCommit message (Collapse)AuthorFilesLines
2024-04-08add support for CHIPS (Cookies Having Independent Partitioned State) (#1752)Gravatar Gürkan Yeşilyurt 1-0/+1
* add support for CHIPS (Cookies Having Independent Partitioned State) * fix comment lines * Update cookie.go fix lint error: should omit comparison to bool constant
2024-02-21feat:support zstd compress and uncompressed (#1701)Gravatar Co1a 1-0/+1
* feat:support zstd compress and uncompressed * fix:real & stackless write using different pool to avoid get stackless.writer * fix:zstd normalize compress level * Change empty string checks to be more idiomatic (#1684) * chore:lint fix and rebase with master * chore:remove 1.18 test & upgrade compress version * fix:error default compress level * Fix lint --------- Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
2024-02-11Follow RFCs 7230 and 9112 for HTTP versions (#1710)Gravatar Erik Dubbelboer 1-1/+0
Require that HTTP versions match the following pattern: HTTP/[0-9]\.[0-9]
2023-07-02Auto add 'Vary' header after compression (#1585)Gravatar AutumnSun 1-0/+1
* 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'
2023-01-06server.go Simplify default Server name logic (#1467)Gravatar Sergey Ponomarev 1-1/+1
The serverName atomic.Value field is used as a cache. This is not needed and logic can be simplified. See related #1458
2023-01-02client.go Simplify default UA logic (#1466)Gravatar Sergey Ponomarev 1-1/+1
The getClientName() checks if !NoDefaultUserAgentHeader then returns the Client.Name field. But it also saves it to atomic field clientName. This is not needed and logic can be simplified. Previously the clientName vas a byte slice that was copied from c.Name and cached. See 02e0722fb73c6237818b8e5af55957eb919a7334 Fix #1458
2022-02-28Add windows support to normalizePathGravatar Erik Dubbelboer 1-15/+19
This is probably still not 100% sure and there are still many bugs with FS on windows. But it's a slight improvement. Fixes #1226
2021-12-05Add trailer support (#1165)Gravatar ichx 1-21/+29
* 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
2021-09-10Check go fmt during lint (#1097)Gravatar Erik Dubbelboer 1-6/+6
2021-09-07Adding new compressible prefixes (#1092)v1.30.0Gravatar Kyle Unverferth 1-2/+7
* Adding "image/svg" as compressible prefix * Adding additional compressible prefixes from https://support.cloudflare.com/hc/en-us/articles/200168396-What-will-Cloudflare-compress-
2021-09-06feat: improve IsMethod (#1088)Gravatar tyltr 1-10/+0
* 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>
2021-05-17Use proper content-type when it is not present (#1023)Gravatar MoreFreeze 1-0/+1
Co-authored-by: liuchenxing <liuchenxing@bytedance.com>
2021-03-20Use bytes.IndexByte instead of bytes.Index for single byte lookup (#999)Gravatar Mike Faraponov 1-1/+0
* Update uri.go * Update strings.go
2021-02-16Added Protocol() as a replacement of hardcoded strHTTP11 (#969)Gravatar Darío 1-0/+1
* Added Protocol() as a replacement of hardcoded strHTTP11 * Applied review changes * Modify h.proto in parseFirstLine
2020-05-15Add Brotli supportGravatar Erik Dubbelboer 1-0/+1
New Functions: CompressHandlerBrotliLevel(h RequestHandler, brotliLevel, otherLevel int) RequestHandler Request.BodyUnbrotli() ([]byte, error) Response.BodyUnbrotli() ([]byte, error) AppendBrotliBytesLevel(dst, src []byte, level int) []byte WriteBrotliLevel(w io.Writer, p []byte, level int) (int, error) WriteBrotli(w io.Writer, p []byte) (int, error) AppendBrotliBytes(dst, src []byte) []byte WriteUnbrotli(w io.Writer, p []byte) (int, error) AppendUnbrotliBytes(dst, src []byte) ([]byte, error) New Constants: CompressBrotliNoCompression CompressBrotliBestSpeed CompressBrotliBestCompression CompressBrotliDefaultCompression Brotli compression levels are different from gzip/flate. Because of this we have separate level constants and CompressHandlerBrotliLevel takes 2 levels. I didn't add Brotli support to CompressHandler as this could cause a spike in CPU usage when users upgrade fasthttp. fasthttp.CompressBrotliDefaultCompression is not the same as brotli.DefaultCompression. brotli.DefaultCompression is more than twice as slow as fasthttp.CompressBrotliDefaultCompression which I thought was unreasonable as default.
2019-09-27The Authorization header should include the Basic keywordGravatar Erik Dubbelboer 1-0/+1
Thanks to https://github.com/paween1980
2019-08-18Add support for user:pass in URLs (#614)Gravatar Erik Dubbelboer 1-0/+3
Fixes #609
2019-06-14Support SameSite value "None" cookie attribute (#581)Gravatar Rem 1-0/+1
* Support SameSite value "None" cookie attribute * Fix typo in CookieSameSiteNoneMode comment * fix comment for SameSite None
2019-05-28:zap: Used Headers constants instead raw stringsGravatar Maxim Lebedev 1-20/+20
2019-05-06Added methods constants (#567)Gravatar Maxim Lebedev 1-9/+9
* :sparkles: Added methods constants * :ok_hand: Fixed methods comment due to review changes
2019-02-09Remove duplicate checkGravatar Erik Dubbelboer 1-2/+1
We already compare headers case insensitive so we don't need to compare two different cases.
2018-12-13Support SameSite cookie attribute (#488)Gravatar Matt Reyer 1-7/+10
SameSite cookie attribute implementation.
2018-09-13Adds support for max-age cookie value. Fixes #184 (#412)Gravatar David Byttow 1-0/+1
Adds support for max-age cookie value
2018-03-12Add missing http methodsGravatar toyblocks 1-5/+9
Add support for 'CONNECT', 'OPTIONS', 'TRACE' and 'PATCH'
2017-05-17Compress responses only if their content-type starts with text/ or application/Gravatar Aliaksandr Valialkin 1-0/+2
2016-05-27Issue #107 (#108)Gravatar Tracer Tong 1-4/+5
2016-03-29Issue #73: added 'HttpOnly' and 'secure' flags support to CookieGravatar Aliaksandr Valialkin 1-3/+5
2016-01-05FS: added support for byte range requestsGravatar Aliaksandr Valialkin 1-0/+4
2016-01-04Issue #29: use time.UTC instead of time.LoadLocation, since this call may ↵Gravatar Aliaksandr Valialkin 1-0/+1
fail on systems without certain config files
2015-12-25Pull request #24: added support for '100 Continue' responses and 'Expect: ↵Gravatar Aliaksandr Valialkin 1-0/+4
100-continue' requests. Kudos to @celer
2015-12-25Issue #14: added CompressHandler wrapper for transparent response ↵Gravatar Aliaksandr Valialkin 1-0/+1
compression support
2015-12-25Issue #14: added support for response body compressionGravatar Aliaksandr Valialkin 1-0/+3
2015-12-16Use utf-8 charset in defaultContentTypeGravatar Aliaksandr Valialkin 1-1/+1
2015-12-10Issue #16: support 'Connection: keep-alive' header for non-http/1.1 requests ↵Gravatar Aliaksandr Valialkin 1-0/+2
and/or responses
2015-12-09Added support for If-Modified-Since to SendFile and FSGravatar Aliaksandr Valialkin 1-0/+2
2015-12-03Remove '/./' parts from pathGravatar Aliaksandr Valialkin 1-0/+1
2015-11-29Added request PUT method supportGravatar Aliaksandr Valialkin 1-0/+1
2015-11-28Follow redirects in client Get* and Post* methods. Added Redirect method to ↵Gravatar Aliaksandr Valialkin 1-0/+1
RequestCtx.
2015-11-27Added support form multipart/form-data POST requestsGravatar Aliaksandr Valialkin 1-0/+2
2015-11-25Shorten default server and client namesGravatar Aliaksandr Valialkin 1-2/+2
2015-11-24Added support for 'Connection: Upgrade', so RequestHandler may detect such ↵Gravatar Aliaksandr Valialkin 1-0/+1
connections and hijack them
2015-11-19Optimization: do not parse full requests headers on ConnectionClose and ↵Gravatar Aliaksandr Valialkin 1-1/+0
Header calls. This should speed up common case with GET requests on the server
2015-11-19removed charset=utf-8 from default content-type, since it is implied by defaultGravatar Aliaksandr Valialkin 1-1/+1
2015-11-17do not optimize for content-length access on response headers, since it ↵Gravatar Aliaksandr Valialkin 1-0/+1
works slower than full headers parsing
2015-11-13Added support for identity responses. See ↵Gravatar Aliaksandr Valialkin 1-0/+1
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 for details
2015-11-12Added https support to clientGravatar Aliaksandr Valialkin 1-0/+1
2015-11-08Set default user-agent in http requestGravatar Aliaksandr Valialkin 1-0/+1
2015-11-05Added response cookies supportGravatar Aliaksandr Valialkin 1-0/+5
2015-11-03Initial support of request cookiesGravatar Aliaksandr Valialkin 1-0/+1
2015-11-03Extracted predefined strings into a separate fileGravatar Aliaksandr Valialkin 1-0/+36