Commit Graph

48 Commits

Author SHA1 Message Date
Oleksandr Redko 9d6b470260 chore: Add missing dots at the end of comments (#1677) 2023-12-13 13:56:24 +08:00
Oleksandr Redko f196617f55 chore: Use 'any' instead of 'interface{}' (#1666)
gofmt -w -r "interface{} -> any" -l .
2023-11-24 11:33:04 +01:00
Oleksandr Redko ffdf59d04c Enable gofumpt linter; format code gofumpt -w . (#1576) 2023-06-13 15:18:59 +02:00
Oleksandr Redko 934f04e330 Refactor golangci-lint config and remove redundant nolints (#1486)
* Refactor golangci-lint config

- Use golangci-lint-action for GitHub workflow.
- Add additional golangci-lint run options.
- Remove unused nolint directives.

* Revert exclude-use-default option
2023-02-11 15:35:15 +08:00
Erik Dubbelboer ffab77a59d Improve return value reusability documentation 2021-10-01 13:38:31 +02:00
tyltr 1647255ec9 remove unnecessary op (#1095) 2021-09-07 09:40:13 +02:00
Erik Dubbelboer a18c6322a2 Fix cookie panic 2021-05-21 12:11:09 +02:00
Erik Dubbelboer 32793db72d Run golangci-lint using a Github Action 2019-11-16 18:09:28 +01:00
Rem 9ba4cef1ba Support SameSite value "None" cookie attribute (#581)
* Support SameSite value "None" cookie attribute

* Fix typo in CookieSameSiteNoneMode comment

* fix comment for SameSite None
2019-06-14 16:07:33 +02:00
xuecai 10b98c2cdf add conn's address info in Response (#537)
* reset commit
* fix response copy bug; add tests;
2019-02-16 10:50:14 +00:00
Matt Reyer 62dcd6fdce Support SameSite cookie attribute (#488)
SameSite cookie attribute implementation.
2018-12-13 21:34:49 +06:30
David Byttow dbc9965d33 Adds support for max-age cookie value. Fixes #184 (#412)
Adds support for max-age cookie value
2018-09-13 12:19:38 +08:00
Erik Dubbelboer 7796335d5f Do case insensitive comparisons for headers and cookies 2018-09-11 20:07:09 +03:00
Erik Dubbelboer 373357d2d4 Try the same formats as net/http for cookie expire
See: https://github.com/golang/go/blob/00379be17e63a5b75b3237819392d2dc3b313a27/src/net/http/cookie.go#L133-L135

Fixes #175
2018-08-29 22:55:21 +08:00
Erik Dubbelboer e277e51b15 Add support for ResponseHeader.Peek("Set-Cookie")
See: https://github.com/erikdubbelboer/fasthttp/issues/4
2018-08-27 21:42:16 +00:00
Aliaksandr Valialkin 45697fe30a Issue #141: do not urlencode cookies
https://tools.ietf.org/html/rfc6265 says nothing about cookies encoding.
2016-07-18 18:25:03 +03:00
Aliaksandr Valialkin 0d43464f64 Renamed unsafeBytes2Str to b2s 2016-03-29 16:26:21 +03:00
Aliaksandr Valialkin 1498d8174e Issue #73: added 'HttpOnly' and 'secure' flags support to Cookie 2016-03-29 16:12:59 +03:00
Aliaksandr Valialkin e0eac18652 use 'switch string(key) {}' instead of 'switch { case bytes.Equal(key, ...) ... }'. This may improve switch statement's performance 2016-03-10 17:44:58 +02:00
Aliaksandr Valialkin 8280b7a162 Moved empty noCopy struct to the top of container structs. See @stemar94 's comment at https://github.com/golang/go/issues/12884 for details 2016-03-06 00:17:08 +02:00
Aliaksandr Valialkin 9f43aa1601 Do not expose noCopy.Lock 2016-03-04 21:20:52 +02:00
Aliaksandr Valialkin 9fa69c74af Embed noCopy struct into structs, which mustn't be copied
This should help `go vet` detecting invalid structs' copyings.
See https://github.com/golang/go/issues/8005#issuecomment-190753527 for details.
2016-03-04 16:57:24 +02:00
Aliaksandr Valialkin 6489c32a90 Added AcquireCookie / ReleaseCookie helpers 2016-02-19 13:03:35 +02:00
Aliaksandr Valialkin fd2887a5fc Issue #53: Clarify that the following instances mustn't be used from concurrently running goroutines: Args, Cookie, URI, RequestCtx, Request, Response, RequestHeader and ResponseHeader 2016-02-17 11:45:21 +02:00
Aliaksandr Valialkin 52ddf98cfd Fixed golint warnings 2016-01-19 12:43:23 +02:00
Aliaksandr Valialkin 485098e5dc Exported AppendQuotedArg 2016-01-13 18:17:03 +02:00
Aliaksandr Valialkin 4bca54c0bb Issue #29: use time.UTC instead of time.LoadLocation, since this call may fail on systems without certain config files 2016-01-04 15:55:30 +02:00
MK a8ab4c12c7 fix typo in comment 2015-12-31 17:34:29 +02:00
Aliaksandr Valialkin 5ff6be8fee Substitute AppendBytesStr by append() 2015-12-19 20:38:10 +02:00
Aliaksandr Valialkin ddfa9f5dc0 Clarify Append* return values 2015-12-19 20:29:17 +02:00
Aliaksandr Valialkin 4ac44f0c6c Mention which structs are safe for use from concurrently running goroutines (Server, Client and HostClient) and which structs are unsafe to use from concurrently running goroutines - all the other 2015-12-03 13:38:59 +02:00
Aliaksandr Valialkin 29b732217a Added CopyTo to Cookie for the sake of API consistency 2015-11-29 12:15:14 +02:00
Aliaksandr Valialkin 9f7463cd28 Access Cookie members via accessors 2015-11-22 13:29:21 +02:00
Aliaksandr Valialkin a862d8592a Documentation update 2015-11-22 06:33:58 +02:00
Aliaksandr Valialkin 924d119e96 Added Cookie.WriteTo 2015-11-22 01:32:39 +02:00
Aliaksandr Valialkin 48c0f89ee7 Added Stringer implementations to URI, Args and Cookie 2015-11-19 12:51:34 +02:00
Aliaksandr Valialkin 835bf87605 API consistency: Clear -> Reset to be consistent with standard go packages 2015-11-18 17:55:28 +02:00
Aliaksandr Valialkin 9735e0127b Exported ParseUint, ParseUfloat and AppendHTTPDate, which may be frequently used in http apps 2015-11-11 11:00:22 +02:00
Aliaksandr Valialkin f1ff68f9f1 Optimized args, cookies and headers parsing 2015-11-05 14:28:07 +02:00
Aliaksandr Valialkin 227b0a4bd3 Trim input buffer inside decodeArg 2015-11-05 13:10:56 +02:00
Aliaksandr Valialkin bb73a5cbfa Trim dst buffer inside decodeCookieArg. This simplifies the code 2015-11-05 12:55:43 +02:00
Aliaksandr Valialkin 236d4bd461 Added Cookie.ParseBytes to be consistent with Args 2015-11-05 12:54:10 +02:00
Aliaksandr Valialkin 6fb8b96152 Increased cookies' parsing performance 2015-11-05 12:47:30 +02:00
Aliaksandr Valialkin dfec0d9d36 Eliminated redundant memory allocation during cookie expiration time parsing 2015-11-05 12:12:15 +02:00
Aliaksandr Valialkin 87105b99cb Added response cookies support 2015-11-05 12:07:54 +02:00
Aliaksandr Valialkin 4a823fa707 Properly encode cookie without name 2015-11-04 19:02:49 +02:00
Aliaksandr Valialkin 86ddfc73be Skip empty cookies 2015-11-04 18:08:29 +02:00
Aliaksandr Valialkin 4123c87e7c Initial support of request cookies 2015-11-03 19:08:34 +02:00