M. Efe Çetin
2e81dca7b2
update compress modulule, drop 1.16 ( #1482 )
2023-02-06 04:27:38 +01:00
Erik Dubbelboer
9d5a7bf7e3
Add support for Go 1.20 ( #1481 )
2023-02-03 08:41:39 +01:00
kinggo
b2e66a55d4
docs: add http2curl ( #1480 )
2023-02-03 04:38:07 +01:00
kinggo
776a4c721e
fix: modify normalizePath ( #1478 )
2023-02-01 06:51:12 +01:00
tyltr
eef368eb8d
clear dst bodyRaw before copy ( #1476 )
2023-01-23 12:07:21 +08:00
kinggo
e87f84c51a
fix: CopyTo doesn't copy bodyraw deeply ( #1471 )
2023-01-14 10:44:11 +08:00
Aadithya V
fc2d704c1f
chore: Update README.md ( #1470 )
...
Grammar fix in doc's introduction.
v1.44.0
2023-01-10 08:46:18 +01:00
Erik Dubbelboer
2a00c86a0e
Github actions/checkout@v3
2023-01-06 05:10:47 +01:00
Sergey Ponomarev
434022b461
server.go Simplify default Server name logic ( #1467 )
...
The serverName atomic.Value field is used as a cache. This is not needed and logic can be simplified.
See related #1458
2023-01-06 04:55:09 +01:00
Sergey Ponomarev
51048b0620
client.go Simplify default UA logic ( #1466 )
...
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 02e0722fb7
Fix #1458
2023-01-02 12:51:39 +08:00
Xuran
e46afc3ae3
fix: client may remove hostclient incorrectly ( #1461 )
2022-12-29 19:18:27 +08:00
Shawn
9b4a7e5bf4
fix http2 adapter ( #1457 )
2022-12-25 10:07:22 +01:00
kinggo
c637221c5f
optimize: allow http head when use getonly ( #1456 )
2022-12-25 09:38:13 +01:00
kinggo
b788e663c6
feat: support custom formvalue function ( #1453 )
2022-12-25 09:37:49 +01:00
kinggo
2a572e08ef
doc: optimize the comment of the Request.Done method ( #1454 )
2022-12-18 11:29:17 +01:00
Amzza0x00
f6aac906c8
Fixed an error caused of character when @ > 1 during proxy authentication ( #1452 )
...
* Fixed a error caused by more @ character during proxy authentication
* Fixed a error caused by more @ character during proxy authentication
2022-12-08 15:03:55 +08:00
Tobias Krischer
951f5a154c
add optional simulated addresses to pipeconn and inmemorylistener ( #1449 )
...
* add optional simulated addresses to pipeconn and inmemorylistener
* add mutexes to addresses of pipeConn and InmemoryListener
2022-12-07 13:31:42 +08:00
Erik Dubbelboer
dbf457ee66
Revert "feat: support mulit/range ( #1398 )" ( #1446 )
...
This reverts commit a468a7dd37 .
v1.43.0
2022-11-28 11:52:30 +01:00
Sergey Ponomarev
c50de95952
client.go fix addMissingPort() ( #1444 )
...
* client.go Make addMissingPort() public
It's needed for those who creates the instance of the HostClient manually.
* client.go fix AddMissingPort()
Previously for IPv6 addresses the default port wasn't added.
The fix adding a test and optimization that should avoid itoa() call and reduce a memory usage
2022-11-28 08:06:09 +01:00
kinggo
49951353c8
feat: add ShutdownWithContext ( #1383 )
v1.42.0
2022-11-20 13:26:36 +02:00
kinggo
7b3bf58850
style: modify typo and remove repeated type conversions ( #1437 )
2022-11-18 08:13:18 +02:00
Andy Pan
8f434434e7
Wait for the response of pipelineWork in background and return it to pool ( #1436 )
2022-11-17 06:31:03 +01:00
Andy Pan
c367454ffe
Fix some potential pool leaks ( #1433 )
2022-11-16 06:46:28 +02:00
Andy Pan
b32a3dda13
Use time.Until(deadline) instead of -time.Since(deadline) ( #1434 )
2022-11-16 06:13:29 +02:00
Andy Pan
8a60232af1
Assert with *net.TCPConn instead of *net.TCPListener in acceptConn() for TCP sockets ( #1432 )
...
Make the code more succinct.
2022-11-15 16:34:34 +01:00
hs son
c57a2ce871
Make sure nothing is nil in tmp slice ( #1423 )
2022-11-14 18:15:41 +02:00
brian-armstrong-discord
f095481f00
Request.SetTimeout ( #1415 )
...
* Request.SetTimeout
This functionally works the same as e.g. Client.DoTimeout(), but we can
also use it for Client.DoRedirect(). There is no way as far as I can
tell to set a timeout on a DoRedirect call, so this makes it possible.
* tests
* docs
2022-11-03 21:25:19 +01:00
nick9822
c88dd5dc02
fix form empty field error when used with pipe ( #1417 )
...
Co-authored-by: root <nikesh.tawde@digitalairtech.com >
2022-11-03 21:24:53 +01:00
byene0923
a468a7dd37
feat: support mulit/range ( #1398 )
...
* feat: support mulit/range
* fix:
1. lint code
2. add SetByteRanges method
* fix: reduce the test number of testFSSingleByteRange
2022-10-30 09:48:46 +01:00
kinggo
3963a79a64
feat: add PeekKeys and PeekTrailerKeys ( #1405 )
...
* feat: add PeekKeys and PeekTrailerKeys
* Improve warning
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com >
2022-10-29 18:57:40 +02:00
byene0923
eca86de6f6
fix: ( #1410 )
...
1. the length of trailer key should > 0
2. fix http_test words typo
2022-10-29 18:32:18 +02:00
byene0923
e2141372b6
fix: ignore body should not set content-length of streaming ( #1406 )
...
* fix: ignore body should not set content-length of streaming https://github.com/valyala/fasthttp/pull/1022
* fix: add commit
2022-10-29 18:32:08 +02:00
kinggo
128e9b35c4
optimize: adjust the behavior of PeekAll based on VisitAll ( #1403 )
v1.41.0
2022-10-22 12:04:46 +02:00
kinggo
2c8ce3b40e
feat: add header.PeekAll ( #1394 )
2022-10-15 15:47:53 +02:00
pj
d404f2db91
make RequestCtx's userdata accept keys that are of type: interface{} ( #1387 )
...
Co-authored-by: rocketlaunchr-cto <rocketlaunchr.cloud@gmail.com >
2022-10-06 16:25:32 +02:00
kinggo
bcf7e8e944
test: merge test in adaptor_test.go ( #1381 )
...
* test: merge test in adaptor_test.go
* Fix lint
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com >
2022-09-18 09:20:03 +02:00
Craig O'Donnell
31fdc796f4
resolve CVE-2022-27664 ( #1377 )
2022-09-15 23:02:06 +02:00
Emre Savcı
40eec0b706
byte to string unsafe conversion in fasthttpadaptor ConvertRequest method ( #1375 )
...
* add byte to string unsafe conversion to fasthttpadaptor ConvertRequest method()
* add nosec comment line
* Update fasthttpadaptor/request.go
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com >
* move unsafe package import next to std packages
* fix lint error in test
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com >
2022-09-15 23:15:26 +03:00
Aoang
a696949f6c
Deprecate Go 1.15 ( #1379 )
...
* Dropping support for 1.15.
* Replaces Go 1.16 Deprecated functions
* Update test build flag
* Fix import sort and comment
* Update github.com/klauspost/compress to v1.15.9
https://github.com/klauspost/compress improved performance and changed Minimum version is 1.16, this should be the final supported release for Go 1.16 (https://github.com/klauspost/compress/commit/6d0019a95afa3221f7522d1f2eed0033b5e79470 ) .
2022-09-15 22:28:25 +03:00
Erik Dubbelboer
2f1e949d91
Improve isTLSAlready check
...
All conn implementations having a Handshake() error method are now seen
as a TLS conn and aren't wrapped in another tls.Client.
v1.40.0
2022-09-03 11:02:32 +02:00
tyltr
404c8a8968
Chore ( #1365 )
...
* chore-1
* chore2
2022-08-29 07:51:37 +02:00
Erik Dubbelboer
79ccfff72b
Don't use tls ClientSessionCache
...
net/http doesn't use it either. Some servers have issues with this
preventing fasthttp from working:
https://github.com/valyala/fasthttp/issues/1364
https://github.com/valyala/fasthttp/issues/1296
https://github.com/valyala/fasthttp/issues/1335
https://github.com/valyala/fasthttp/issues/984
Also removed code that benchmarks crypto/tls as that has nothing to do
with fasthttp.
2022-08-28 10:13:03 +02:00
Erik Dubbelboer
28bec71c96
Fix "use of closed network connection" error check
...
This was refactored out incorrectly in a previous change.
2022-08-26 14:15:21 +02:00
Geralt X Li
3b147b7fe4
Fix(server): reset maxRequestBodySize to the server's config ( #1360 )
...
* fix(server): reset maxRequestBodySize to the server's config when HeaderReceived is set
* fix(server): reset writeTimeout
2022-08-23 16:44:59 +02:00
Qing Moy
af94725d11
Reduce slice growth in adaptor ( #1356 )
2022-08-16 10:28:42 +02:00
Aoang
ea6052464e
Add Go 1.19 Support ( #1355 )
...
* Update Go Version to Go1.19.x And add cache
* Fix CI Line endings
* Update test CI Go Version to Go1.19.x And add cache
* Update Gosec Security Scanner CI to securego/gosec@v2.12 .0
* Format comment
Go 1.19 adds support for links, lists, and clearer headings in doc comments. As part of this change, gofmt now reformats doc comments to make their rendered meaning clearer. See “Go Doc Comments” for syntax details and descriptions of common mistakes now highlighted by gofmt. As another part of this change, the new package go/doc/comment provides parsing and reformatting of doc comments as well as support for rendering them to HTML, Markdown, and text.
ref: https://tip.golang.org/doc/go1.19
ref: https://tip.golang.org/doc/comment
* Fix doc structure
v1.39.0
2022-08-14 11:31:57 +02:00
Erik Dubbelboer
a5f448fc97
Improve Client timeout ( #1346 )
...
Don't run requests in a separate Goroutine anymore. Instead use proper
conn deadlines to enforce timeouts.
- Also contains some linting fixes.
2022-07-29 19:03:15 +02:00
mathew
42f83c60cf
Prevent overflow and panic on large HTTP responses ( #1351 )
2022-07-29 18:58:52 +02:00
mojatter
f3513ccc59
Introduce FS.CompressRoot ( #1331 )
...
* Introduce FS.CompressRoot
* Avoid duplicated filepath.FromSlash
* Introduce filePathToCompressed
* Revert openIndexFile manually
* Join root and path, and then calls filepath.FromSlash
2022-07-10 10:07:18 +02:00
fare83
c94be05897
use timeout insteadof read/writetimeout when timeout lower than read/… ( #1336 )
...
* use timeout insteadof read/writetimeout when timeout lower than read/writetimeout
* use deadtime; fix test timeout;
Co-authored-by: 徐焱 <xuyan4@staff.sina.com.cn >
2022-07-06 14:03:50 +02:00