Erik Dubbelboer
|
d4f0cf56d8
|
Remove fasthttp.ByteBuffer
As advertised in https://github.com/valyala/fasthttp/commit/b5f96d4b4120bb1e09c23ac32baf21a14da4a71d
|
2018-10-01 14:15:29 +08:00 |
|
Erik Dubbelboer
|
1e7885eb56
|
handle 't' and 'true' as bool in QueryArgs
See: https://github.com/erikdubbelboer/fasthttp/pull/46
|
2018-08-21 22:36:22 +08:00 |
|
xPushkin
|
f24d00fcc6
|
A lot of typo fixes
|
2017-10-08 13:30:35 +01:00 |
|
Aliaksandr Valialkin
|
ae643c872d
|
decodeArgAppend code prettifying
|
2017-07-21 16:45:47 +03:00 |
|
Aliaksandr Valialkin
|
6ece3d9359
|
decodeArgAppend* optimization: remove bounds check when decoding percent-encoded string
Benchmark results:
name old time/op new time/op delta
AppendUnquotedArgSlowPath-4 68.9ns ± 2% 63.5ns ± 2% -7.88% (p=0.000 n=10+10)
|
2017-07-21 16:42:32 +03:00 |
|
Aliaksandr Valialkin
|
d257ae60a3
|
ioptimized decodeArgAppend a bit
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)
|
2017-07-21 16:08:21 +03:00 |
|
Aliaksandr Valialkin
|
6ac0fd1a91
|
use more clear decodeArgAppend instead of misleading decodeArg
|
2017-06-20 18:19:36 +03:00 |
|
Aliaksandr Valialkin
|
2db9429ff7
|
added a fast path to decodeArgAppend when the arg doesnt contain encoded chars
|
2017-06-20 13:40:15 +03:00 |
|
Aliaksandr Valialkin
|
b69eba7101
|
Added Args.GetBool helper
|
2017-01-30 19:47:15 +02:00 |
|
Aliaksandr Valialkin
|
e9207dac9e
|
Added Args.Add()
|
2016-03-29 16:49:42 +03:00 |
|
Aliaksandr Valialkin
|
6658e31fd0
|
Eliminated bufKV member from Args struct. This shaves off 16 bytes from RequestCtx struct
|
2016-03-29 16:37:29 +03:00 |
|
Aliaksandr Valialkin
|
eca172369c
|
Pass string key to hasArg instead of byte slice key
|
2016-03-29 16:31:38 +03:00 |
|
Aliaksandr Valialkin
|
0c67179812
|
Added delAllArgsBytes helper
|
2016-03-29 16:30:07 +03:00 |
|
Aliaksandr Valialkin
|
0d43464f64
|
Renamed unsafeBytes2Str to b2s
|
2016-03-29 16:26:21 +03:00 |
|
Aliaksandr Valialkin
|
8b26017325
|
Renamed setArg to setArgBytes
|
2016-03-29 16:19:22 +03:00 |
|
Aliaksandr Valialkin
|
2b172da539
|
re-use appendArg inside setArg
|
2016-03-15 11:27:03 +02:00 |
|
Aliaksandr Valialkin
|
3f6e5b64a9
|
optimized delAllArgs
|
2016-03-11 10:59:01 +02:00 |
|
Aliaksandr Valialkin
|
38356e216e
|
Issue #64: properly delete header values via Del call
|
2016-03-10 17:22:59 +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
|
5a26dcce53
|
Added AcquireArgs and ReleaseArgs helper functions
|
2016-02-19 12:53:39 +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
|
db0b8124a5
|
Added Args.PeekMulti for obtaining multiple query arg values for the given key
|
2016-02-15 14:01:22 +02:00 |
|
Aliaksandr Valialkin
|
485098e5dc
|
Exported AppendQuotedArg
|
2016-01-13 18:17:03 +02:00 |
|
Aliaksandr Valialkin
|
052a3cfb65
|
Substitute EqualBytesStr(s, b) by string(b) == s
|
2015-12-19 20:44:01 +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
|
5f952e632f
|
Microoptimization: substituted switch by if in decodeArgAppend, so the function may be inlined
|
2015-12-01 16:23:33 +02:00 |
|
Aliaksandr Valialkin
|
3e3d68aed2
|
Code cleanup: removed redundant unhex
|
2015-11-30 19:33:32 +02:00 |
|
Aliaksandr Valialkin
|
386ca71534
|
Added missing args.Reset in CopyTo
|
2015-11-29 12:14:54 +02:00 |
|
Aliaksandr Valialkin
|
52c04f13b2
|
Added support for 'Connection: Upgrade', so RequestHandler may detect such connections and hijack them
|
2015-11-24 15:48:10 +02:00 |
|
Aliaksandr Valialkin
|
3cc7fe9675
|
Moved byte slice manipulation functions to bytesconv.go
|
2015-11-22 13:45:42 +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
|
b5a101843a
|
Added SetUint helper to Args
|
2015-11-19 12:27:01 +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
|
f1f78f0828
|
Hide Request.URI and Request.PostArgs behind accessors, which automatically call parse URI and PostArgs on first access
|
2015-11-15 23:47:22 +02:00 |
|
Aliaksandr Valialkin
|
8a42c802f5
|
Optimized Peek() function for args and request header cookies
|
2015-11-14 20:38:47 +02:00 |
|
Aliaksandr Valialkin
|
88e41d9b08
|
Removed accessors converting []byte to string, i.e. allocating memory. This should reduce memory usage for apps using fasthttp, since now they shoud either use []byte or do string() conversion on their own :)
|
2015-11-14 18:25:00 +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
|
44826d0838
|
Improved Args parsing speed
|
2015-11-05 13:03:47 +02:00 |
|
Aliaksandr Valialkin
|
03ebc8df37
|
Properly implement Args.Has* for args with nil value
|
2015-11-04 17:59:49 +02:00 |
|
Aliaksandr Valialkin
|
d70261286c
|
Added CopyTo, VisitAll and *Bytes* helper functions to Args, RequestHeader and ResponseHeader
|
2015-10-27 12:53:33 +02:00 |
|
Aliaksandr Valialkin
|
e9d6d7f561
|
Document Request, Response, RequestHeader, ResponseHeader, URI and Args
|
2015-10-23 15:56:12 +03:00 |
|
Aliaksandr Valialkin
|
bf2a91a77b
|
Do not encode dot in args
|
2015-10-22 17:48:14 +03:00 |
|