Aliaksandr Valialkin
78e415082d
an attempt to fix travis build
2016-11-14 22:40:43 +02:00
Aliaksandr Valialkin
89fe89ae74
stackless: optimization: do not issue zero-length writes to underlying writer
2016-11-11 15:16:52 +02:00
Aliaksandr Valialkin
3246b4efb5
Issue #173 : improve error messages on headers parsing
2016-11-10 20:00:54 +02:00
Aliaksandr Valialkin
02fe9b8533
Issue #173 : return valid response instead of silently closing connection on request parsing errors
2016-11-10 18:09:23 +02:00
Aliaksandr Valialkin
b7e3627df2
LBClient: prevent servers' hammering by randomizing the initial client to use
2016-11-09 19:11:48 +02:00
Aliaksandr Valialkin
6cd438ba89
LBClient: panic on empty Clients
2016-11-07 17:21:28 +02:00
Aliaksandr Valialkin
f49c6b3f96
Reduce stack space usage when using response compression
2016-11-03 19:38:42 +02:00
Aliaksandr Valialkin
4ee6517626
Issue #193 : properly handle nil body when calling WriteGzip* and WriteDeflate* on Response struct
2016-10-31 13:41:50 +02:00
Aliaksandr Valialkin
44f08d5588
Issue #196 : avoid returning (nil, nil) from fasthttp.Dial*
2016-10-29 23:02:11 +03:00
Aliaksandr Valialkin
cd7c1dafbc
Properly handle TimeoutHandler in custom server implementations, which use RequestCtx.Init* functions
2016-10-21 15:39:05 +03:00
Aliaksandr Valialkin
a965b01816
Added an example for LBClient
2016-10-21 14:53:44 +03:00
Aliaksandr Valialkin
935c556b36
Added RequestCtx.Hijacked method for determining whether the underlying connection is hijacked
2016-10-21 14:33:22 +03:00
Aliaksandr Valialkin
204fed9187
Revert "Use standard compress packages until https://github.com/klauspost/compress/issues/64 is fixed"
...
The original issue has been fixed, so reverting.
This reverts commit 2f4876aaf2 .
2016-10-20 18:02:21 +03:00
Aliaksandr Valialkin
2f4876aaf2
Use standard compress packages until https://github.com/klauspost/compress/issues/64 is fixed
2016-10-20 15:30:15 +03:00
Aliaksandr Valialkin
d18f43c48c
Issue #191 : Respect ServerName set in user-provided tls.Config
2016-10-20 15:26:25 +03:00
Aliaksandr Valialkin
b5d497902b
Added LBClient for balancing load among multiple clients
...
This will be used by httptp from https://github.com/valyala/httpteleport .
2016-10-20 13:49:00 +03:00
Aliaksandr Valialkin
8ab3351f0a
Unshadow err in client test
2016-10-13 17:42:25 +03:00
Aliaksandr Valialkin
93c15ed83c
Remove unused variables
2016-10-13 17:40:57 +03:00
Aliaksandr Valialkin
e0c9f3d5ff
typo fixes in comments
2016-10-13 17:39:06 +03:00
Aliaksandr Valialkin
432960e479
Issue #188 : Add tests for empty header values' parsing
2016-10-13 16:17:09 +03:00
Aliaksandr Valialkin
b131f05f50
Revert "Use standard compress/* packages instead of github.com/klauspost/compress/*"
...
According to @klauspost, his packages are still faster than the standard packages.
See https://github.com/valyala/fasthttp/commit/a98191f43560ea2ddbbf848c1c727daeed2e39ae#commitcomment-19409416
for details.
This reverts commit a98191f435 .
2016-10-13 14:57:35 +03:00
Aliaksandr Valialkin
a98191f435
Use standard compress/* packages instead of github.com/klauspost/compress/*
...
The reasons are:
- @klauspost optimized standard packages in go1.7+
- This removes an external dependency from fasthttp
2016-10-13 13:01:51 +03:00
Aliaksandr Valialkin
4ca4d0ea09
Client, HostClient, PipelineClient: verify TLS server name
2016-10-12 19:49:23 +03:00
Aliaksandr Valialkin
07f692d02d
Revert "Redirection support for Do(*Request, *Response)"
...
This breaks Get*() with redirects. DoFollowRedirects must be implemented
on top of Do() instead of hacking on internal doRequestFollowRedirects.
This reverts commit 6438022109 .
2016-10-05 12:44:51 +03:00
Aliaksandr Valialkin
0509ba9f93
Revert "removing legacy doRequestFollowRedirects()"
...
This reverts commit 97e154e4cd .
2016-10-05 12:44:45 +03:00
Sick Yoon
97e154e4cd
removing legacy doRequestFollowRedirects()
2016-10-05 12:37:18 +03:00
Sick Yoon
6438022109
Redirection support for Do(*Request, *Response)
2016-10-05 12:37:18 +03:00
Aliaksandr Valialkin
aa4742b5ef
HostClient: make sure only a single connsCleaner is running. Based on the PR #160 by @iizotop
2016-10-05 12:20:17 +03:00
Aliaksandr Valialkin
b43280dfe8
expvarhandler: properly generate json output when regexp filter is present
2016-09-27 20:02:30 +03:00
Aliaksandr Valialkin
930362b9f8
go vet fix
2016-09-27 20:01:51 +03:00
Aliaksandr Valialkin
31a397777b
fasthttputil.PipeConns: add read/write deadline support
2016-09-26 18:09:21 +03:00
Aliaksandr Valialkin
d03a227209
Added reduceMemoryUsage argument to RequestCtx.Init2 - it is required for httpteleport
2016-09-23 12:10:21 +03:00
Aliaksandr Valialkin
a52a42acd6
Added HostClient.PendingRequests(), which may be used for balancing load among multiple HostClient instances
2016-09-21 23:03:30 +03:00
Aliaksandr Valialkin
ec59ce31a6
Added RequestCtx.Init2 function for the upcoming httpteleport project
2016-09-20 20:43:25 +03:00
Aliaksandr Valialkin
95be7a5849
switch reuseport to github.com/valyala/tcplisten
2016-09-13 18:52:22 +03:00
Aliaksandr Valialkin
4f66eb3fbb
Do not busy wait on free connection in DoDeadline and DoTimeout, since this may result in a lot of goroutines stalled in the busy wait for free connections
2016-09-12 14:19:13 +03:00
Aliaksandr Valialkin
3e1cb31dcd
Added SwapBody to Request and Response for zero-copy body pass between Request and Response objects
2016-09-12 13:42:59 +03:00
Aliaksandr Valialkin
0503f9d38c
reuseport: enable TCP_FASTOPEN
2016-09-06 16:19:29 +03:00
Aliaksandr Valialkin
a0f498b65b
reuseport: reduce the number of context switches incurred the listener via TCP_DEFER_ACCEPT
2016-08-29 18:38:03 +03:00
Aliaksandr Valialkin
834fb48f10
Immediately write compressed response data to the connection after the user flushes the data from StreamWriter
2016-08-18 13:03:57 +03:00
Nicolas Bazire
9f7999be97
fix DoDeadline side effect when no free conn ( #145 )
2016-08-17 20:24:33 +03:00
Andrew Pogrebnoy
c6104e0614
Fix Go Report badge in README ( #143 )
2016-08-17 20:22:20 +03:00
Aliaksandr Valialkin
2662f2e1f4
Allow redirecting to urls without scheme, i.e. //google.com/foo.bar
2016-08-17 18:55:32 +03:00
Aliaksandr Valialkin
5210f60181
Detect overriden TLS connections in RequestCtx.IsTLS and RequestCtx.TLSConnectionState
2016-08-17 18:01:59 +03:00
Aliaksandr Valialkin
c665919a09
Fixed a race when reading data from pipe. This fixes flacky tests involving fasthttputil.PipeConns: TestResponseGzipStream and TestWorkerPoolMaxWorkersCountSerial
2016-08-17 17:42:10 +03:00
Aliaksandr Valialkin
8e21bc7f60
do not compress response body again if Content-Encoding is set
2016-08-17 14:50:58 +03:00
Aliaksandr Valialkin
d055141f64
Propagate 'https' scheme to request URI for TLS connections
2016-08-17 14:01:35 +03:00
Aliaksandr Valialkin
28338bdad8
run travis tests on go 1.7
2016-08-17 13:56:33 +03: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
Sarjono Mukti Aji
8edddf21b9
add missing http status codes ( #140 )
2016-07-18 17:48:36 +03:00