Vladimir Panteleev
94903c884a
std.net.curl: Fix fast-path check when encoding is "utf-8" (lower-case) ( #10721 )
...
For HTTP, the response body encoding is specified in the
"Content-Type" header, e.g.: "Content-Type: application/json;
charset=utf-8".
MDN says:
> - `charset`: Indicates the character encoding standard used.
> The value is **case insensitive but lowercase is preferred**.
However, `_decodeContent` was comparing the encoding with the exact
string "UTF-8", which causes most HTTP requests to go through the slow
path.
Fix this by using `icmp`, like elsewhere in the module for
case-insensitive string comparisons.
2025-03-29 18:59:08 +08:00
Nick Treleaven
beeed12c06
Fix assigning const(void)[] to void[]
...
Needed for https://github.com/dlang/dmd/pull/16583 .
2024-06-16 08:57:24 +02:00
MrcSnm
4d332baad1
Fix Bugzilla Issue 24458 - Mac M3 associative array keys on std.net.curl gets overwritten
2024-03-31 15:57:18 -03:00
MrcSnm
afb0b3485b
Fix Bugzilla Issue 24458 - Mac M3 associative array keys on std.net.curl gets overwritten
2024-03-30 08:47:50 -03:00
Dennis Korpel
096dee19e0
Remove regex usage from std.net.curl
2023-12-24 18:08:35 +01:00
Jeremy
3c74c2b88a
Add an introduction to the std.json documentation, fix some mistakes in std.curl and replace broken links in std.stdio ( #8724 )
...
* Fix some mistakes in curl.d
* Add an introduction for std.json
* Fix more documentation in curl.d
* Fix broken links in std.stdio documentation
2023-03-21 11:01:15 +02:00
Paul Backus
ec947ebc0f
std.net.curl: add missing import to examples
...
Fixes issue 23724 - HTTP.onReceive example does not compile
2023-02-18 00:40:25 +01:00
Iain Buclaw
176857162d
Update downloads.dlang.org links to use https
2022-10-03 22:21:33 +02:00
Iain Buclaw
352258539c
Fix 'the the' typos in Phobos documentation
2022-09-20 21:31:46 +02:00
Geod24
04f3979317
Replace 'Issue XXX' with Bugzilla links
...
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Jacob Carlborg
ce8cfab0f8
Remove std.net.curl
for iOS derived platforms
...
libcurl is not shipped on iOS derived platforms.
2020-03-03 12:51:08 +01:00
Alexandru Militaru
bb62aaca3d
Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest
2020-01-19 14:05:17 +02:00
Bernhard Seckinger
94ee73f71d
Fix Issue 18446 - Wrong curl onProgress examples
2019-12-12 13:26:49 +01:00
Atila Neves
4cfef68d61
Replace in
with const
in preparation of dmd change
...
Changing dmd to implement `in` meaning `scope const` when DIP1000 is
selected causes Phobos to fail to compile. This changes Phobos in
preparation for that change.
2019-10-23 12:41:35 +02:00
Vladimir Panteleev
02b97f851c
Add missing punctuation
2019-08-21 14:30:31 +00:00
Feldwor
6a6b09d176
Add one line of "Example:" Label
2019-08-21 10:44:50 +03:00
Feldwor
e0cc331eb5
Move out comment to outer for consistency
2019-08-21 10:23:47 +03:00
Feldwor
9c62374c56
Asterisk mistake
...
Co-Authored-By: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
2019-08-20 19:50:08 +03:00
Feldwor
e94895711b
Fix HTTPS issues in the Examples
2019-08-20 19:40:56 +03:00
Feldwor
967b4cfbee
Specifying URL for the request
2019-08-20 19:16:54 +03:00
Feldwor
e775bd9973
Remove all three example lines
2019-08-20 18:31:44 +03:00
Feldwor
b656def0f0
Remove redundant HTTP acronyms, fix spelling
2019-08-20 18:28:02 +03:00
Feldwor
508ac918da
Add missing http declaration
2019-08-20 18:08:01 +03:00
Feldwor
4c00377268
Add empty line
2019-08-20 18:04:48 +03:00
Feldwor
aeea7270bf
Split example into three pieces
2019-08-20 17:30:44 +03:00
Feldwor
d09d4fad98
Update curl.d
2019-08-20 17:03:21 +03:00
Feldwor
d7c66373c5
Use new syntax for concatination
2019-08-20 16:53:27 +03:00
Feldwor
2b192be005
Remove concatination completely
...
Concatination breaks and give wrong results, so I decided to remove it completely
2019-08-20 12:51:43 +03:00
Feldwor
06efd236b2
Update curl.d
...
* Fixed missing http variable
* Fixed deprecated concatenation
```
Error: Implicit string concatenation is deprecated, use "http://upload.wikimedia.org/wikipedia/commons/ " ~ "5/53/Wikipedia-logo-en-big.png" instead
```
2019-08-20 12:25:13 +03:00
Iain Buclaw
c6bd674325
std/net/curl.d: Don't call exit in non-main thread
2019-04-06 14:20:38 +02:00
Iain Buclaw
8d51519f3f
fix Issue 18519: missing curl + phobos = std.net.curl unittest timing out
...
Disable the std.net.curl tests in the makefile, not the module.
2019-01-03 15:12:44 +01:00
Iain Buclaw
d36b28c3fc
std.net.curl: Shutdown socket before closing in unittest
...
This fixes a thread deadlock that occurs in the test runner if libcurl
is missing.
2019-01-03 00:53:04 +01:00
Iain Buclaw
1dcb92aade
std.net.curl: Check temporary file exists before removing
...
As seen when libcurl cannot be loaded (missing library), the lack of
checking causes a new exception to be thrown while another is inflight.
2019-01-03 00:53:04 +01:00
Martin Nowak
fea8ee223f
Merge remote-tracking branch 'upstream/stable' into merge_stable
2018-12-28 22:25:14 +01:00
Thomas Mader
5279b34946
Add LibcurlPath version option
...
Adds possibility to specify absolute path to libcurl.
The TZDatabaseDir version option already does the same for the tzdata directory.
This commit enables the same fix for the path to libcurl. It's needed for Operating systems like NixOS without a search path for dynamic libs.
See https://issues.dlang.org/show_bug.cgi?id=15391 for more information.
Additionally I removed the Makefile part of the TZDatabaseDir solution
because the necessary compiler arguments can be easily given via DFLAGS, which is also compiler independent and doesn't use the /tmp dir which leads to problems on NixOS.
2018-12-27 14:55:09 +01:00
Nathan Sashihara
6ffd4e7f28
Replace imports of core.sys.windows.windows to speed up compilation
2018-12-17 21:03:31 -05:00
Vladimir Panteleev
1d4cfe3d88
Fix Issue 19367 - std.net.curl does not understand HTTP/2 status lines
2018-11-08 15:24:23 +00:00
Martin Nowak
95a1713806
Merge remote-tracking branch 'upstream/stable' into merge_stable
2018-10-05 17:26:18 +02:00
Iain Buclaw
fd5facfe04
posix.mak: Enforce whitespace before opening parenthesis for version conditions
2018-09-22 16:57:24 +02:00
wolframw
0f999e0a0a
fix issue 18851
2018-09-20 18:52:31 +02:00
wazar
39bb4d7ae8
fix AA test: order of AA elements isn't determined
2018-07-05 02:02:27 +03:00
The Dlang Bot
a56ae8026b
Merge pull request #6542 from wilzbach/underscore
...
Remove a few cases of underscore escaping
merged-on-behalf-of: Steven Schveighoffer <schveiguy@users.noreply.github.com>
2018-06-04 22:29:52 +02:00
Sebastian Wilzbach
c324714fde
Remove a few cases of underscore escaping
2018-06-04 13:05:01 +02:00
Sebastian Wilzbach
14fe47491b
Fix Issue 18940 - [std.net.curl]Can't run examples on page. cannot implicitly convert expression
2018-06-04 03:35:59 +02:00
Sebastian Wilzbach
42894784dd
Markdownify Phobos
...
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
The Dlang Bot
35e9807bbe
Merge pull request #6234 from rainers/curl_freeze
...
fix issue 18519 freebsd 11 + phobos + curl, timing out
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-03-11 14:13:44 +01:00
Rainer Schuetze
b8e5bca94b
fix issue 18519 freebsd 11 + phobos + curl, timing out
...
stop the TestServer waiting in accept() before thread_joinall
2018-02-28 12:50:44 +01:00
Sebastian Wilzbach
214aa016ef
Temporarily disable curl tests for FreeBSD 32-bit
2018-02-27 23:32:07 +01:00
Jack Stouffer
663b5b9278
Revert addition of StdUnittest
2018-02-20 13:32:32 -05:00
Sebastian Wilzbach
a2985edaad
Use -return-exit-code to fail the testsuite on DScanner failures
2018-02-11 01:55:09 +01:00