29 Commits

Author SHA1 Message Date
ringabout
d5549a3c65 updates to macos-15 (#25278)
ref https://github.com/actions/runner-images/issues/13046
2025-11-12 20:33:26 +08:00
Yuriy Glukhov
161b321796 SOCKS5H support for httpclient (#25070)
- Added support for SOCKS5h (h for proxy-side DNS resolving) to
httpclient
- Deprecated `auth` arguments for `newProxy` constructors, for auth to
be embedded in the url.

Unfortunately `http://example.com` is not currently reachable from
github CI, so the tests fail there for a few days already, I'm not sure
what can be done here.
2025-07-30 00:14:41 +02:00
Alexander Kernozhitsky
c88894bf76 Comment out flaky test in tests/stdlib/thttpclient (#23772)
```
$ curl -v http://example.com/404 |& grep 'HTTP/1.1'
> GET /404 HTTP/1.1
< HTTP/1.1 500 Internal Server Error
```

So, the test with http://example.com/404 should be disabled, I think.
2024-06-29 20:49:54 +02:00
metagn
0630c649c6 disable google request in thttpclient (#21572)
was breaking macos CI
2023-03-28 16:34:30 +08:00
Anna
b5a008bac8 Allow some tests to run without network (#20955)
* thttpclient.nim: respect NIM_TESTAMENT_REMOTE_NETWORKING

* tnetconnect.nim: respect NIM_TESTAMENT_REMOTE_NETWORKING
2022-11-29 06:40:28 +01:00
ringabout
3d2f0e2c7c make more standard libraries work with nimPreviewSlimSystem (#20343)
* make more standard libraries work with `nimPreviewSlimSystem`

* typo

* part two

* Delete specutils.nim

* fixes more tests

* more fixes

* fixes tests

* fixes three more tests

* add formatfloat import

* fix

* last
2022-09-27 20:06:23 +02:00
flywind
98cebad7de enable style:usages for stdlib tests [backport: 1.6] (#19715)
* enable style:usages for stdlib tests

* freeAddrInfo

* more tests

* importc

* bufSize

* fix more

* => parseSql and renderSql
2022-04-13 11:53:02 +02:00
Daehee
2d0cb18b9f Fix SIGSEGV in httpclient response body (#16766)
* initialize httpclient response bodyStream; prevent SIGSEGV when getBody is false

* Update lib/pure/httpclient.nim

* Update lib/pure/httpclient.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-01-22 15:04:52 +01:00
Timothee Cour
14730d9d64 fix noDecl => nodecl (#16760)
* fix noDecl => nodecl

* address comment

* disable flaky tests/stdlib/thttpclient.nim on freebsd
2021-01-20 11:08:42 +01:00
Timothee Cour
94430a2e6d enable tests/stdlib/thttpclient.nim (#16710)
* enable tests/stdlib/thttpclient.nim

* disable windows, openbsd
2021-01-14 11:10:02 +01:00
Antonis Geralis
7bde6aa37f Httpclient improvements (#15919)
* Allow passing Uri instead of strings

* Teach httpclient about 308

* Deprecate request proc where httpMethod is string

* More use of HttpMethod enum

Also fix handling of 308, I forgot to add the hunk to the previous
commit.

* Well behaved redirect handler

* Also remove Transfer-Encoding

* Removed unused proc

* Secure redirection rules

Strip sensitive headers for cross-domain redirects.

* Allow httpMethod to be a string again

This way unknown http verbs can be used without any problem.

* Respect user-specified Host header

* Missed multipart argument.

* Try another method

* add changelog

* Fix hidden deprecation warning, parseEnum failing

* This is wrong

* Have to do it manually, parseEnum is not suitable

* Review comments

* update

Co-authored-by: LemonBoy <thatlemon@gmail.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-01-10 13:40:53 +00:00
Miran
5b55aa52d0 fix deprecations and other warnings (#13748) 2020-03-25 19:15:34 +01:00
Leorize
73c8391fd3 azure: disable failing tests 2019-10-03 18:36:18 +02:00
konradmb
addd7b5e20 Fix issue #10726 - HTTP response without Content-Length is not accessible (#11904)
* Add patch by @xenogenesi

* Async test for HTTP/1.1 without Content-Length

* Apply suggestions from code review

Co-Authored-By: Dominik Picheta <dominikpicheta@googlemail.com>
2019-08-08 08:41:56 +02:00
Fredrik Høisæther Rasch
3d5d6931f0 Appveyor thttpclient (#6744)
* App option value for disabling tests for AppVeyor

* Disable thttpclient on AppVeyor
2017-11-15 17:25:48 +01:00
Andreas Rumpf
4ea09e4df5 attempt to make travis green again 2017-11-05 21:44:22 +01:00
Araq
cf28222d2c attempt to make travis green again 2017-09-05 23:26:17 +02:00
Andreas Rumpf
6c7d2ce8fb disable fragile parts of thttpclient.nim 2017-05-04 22:37:07 +02:00
Ruslan Mustakov
ecf278c467 Implement dial, support IPv6 in httpclient (#5763)
* Implement dial, support IPv6 in httpclient

Added ``dial`` procedure to networking modules: ``net``, ``asyncdispatch``,
``asyncnet``. It merges socket creation, address resolution, and connection
into single step. When using ``dial``, you don't have to worry about
IPv4 vs IPv6 problem.

Fixed addrInfo loop in connect to behave properly.
Previously it would stop on first non-immediate failure, instead of
continuing and trying the remaining addresses.

Fixed newAsyncNativeSocket to raise proper error if socket creation
fails.

Fixes: #3811

* Check domain during connect() only on non-Windows

This is how it was in the previous implementation of connect().

* Call 'osLastError' before 'close' in net.dial

* Record osLastError before freeAddrInfo in net.dial

* Add missing docs for 'dial' proc

* Optimize dial to create one FD per domain, add tests

And make async IPv6 servers work on Windows.

* Add IPv6 test to uri module

* Fix getAddrString error handling
2017-05-02 09:25:50 +02:00
Dominik Picheta
f9f86899b5 Implement streamed async/sync downloadFile and deprecate old one. 2017-02-11 14:00:53 +01:00
Dominik Picheta
1b4067a81b Implement streamed body reading in httpclient. 2017-02-11 12:43:16 +01:00
Ruslan Mustakov
35d48765fb Use onThreadCreation to set default SSL context for each thread (#5265)
Fixes: #4998
2017-01-23 21:04:14 +01:00
Dominik Picheta
cff6ec2155 Implements onProgressChanged callback for httpclient. 2016-09-24 22:58:10 +02:00
Dominik Picheta
0baef8e6ea Implements getContent and postContent for (Async)HttpClient. 2016-09-24 20:33:00 +02:00
Dominik Picheta
fa9ec7a6b5 Handle redirects in HttpClient's post procs & post test. 2016-09-24 17:50:58 +02:00
Dominik Picheta
1fb5dd2477 Fixes #4797. 2016-09-19 19:36:35 +02:00
Dominik Picheta
8386476592 Implements proxy support for (Async)HttpClient. Ref #4423.
Fixes #2160.
2016-09-18 22:59:12 +02:00
Dominik Picheta
0c99523ad3 Implements timeouts for synchronous HttpClient. 2016-09-18 19:08:12 +02:00
Dominik Picheta
3ad368f8ca Improvements to httpclient. Refs #4423.
* Adds ability to query HttpCode and compare it with strings.
* Moves HttpMethod to HttpCore module.
* Implements synchronous HttpClient using {.multisync.}.
2016-09-18 18:16:51 +02:00