The standard library of the D programming language
Find a file
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
.circleci Merge Makefiles 2023-12-16 22:22:20 +01:00
.github/workflows Tune FreeBSD timeouts on GitHub Actions (#10708) 2025-03-24 10:33:32 +08:00
changelog Adding a lazy version of std.algorithm.iteration.cache #10687 Open Feature (#10709) 2025-03-28 15:23:30 -07:00
etc/c Add the ODBC 4.0 modules based on ImportC and deprecate the old ODBC 3.5 modules. (#10649) 2025-02-24 22:18:19 +08:00
phobos Add isType to phobos.sys.traits. (#10663) 2025-03-08 21:32:45 +08:00
std std.net.curl: Fix fast-path check when encoding is "utf-8" (lower-case) (#10721) 2025-03-29 18:59:08 +08:00
test Add sumtype to Phobos (#7702) 2021-03-05 12:41:34 +01:00
tools Update to unicode 16.0.0 (#9058) 2024-10-16 06:24:56 +08:00
.codecov.yml yaml: make files comply with YAML specification 2021-08-30 14:54:57 +00:00
.dscanner.ini Add the ODBC 4.0 modules based on ImportC and deprecate the old ODBC 3.5 modules. (#10649) 2025-02-24 22:18:19 +08:00
.editorconfig
.gitignore Remove Phobos 3 dub.sdl and replace it with the build_v3.d build script. (#9069) 2024-10-25 17:49:41 -07:00
build_v3.d Remove Phobos 3 dub.sdl and replace it with the build_v3.d build script. (#9069) 2024-10-25 17:49:41 -07:00
CODEOWNERS Update CODEOWNERS to reflect that logger has been moved out of std.experimental (#10608) 2025-01-02 10:11:36 +08:00
CONTRIBUTING.md Remove bugzilla references 2024-12-01 23:23:23 +01:00
index.dd Remove deprecated std.xml module 2022-08-28 11:30:15 +02:00
LICENSE_1_0.txt
Makefile Update DSCANNER_HASH for interpolated strings (#10720) 2025-03-28 12:49:30 -07:00
posix.mak Restore posix.mak, forwarding to generic Makefile 2023-12-16 22:22:20 +01:00
project.ddoc
README.md Remove bugzilla references 2024-12-01 23:23:23 +01:00
unittest.d Remove deprecated symbols from std.digest.digest 2020-04-09 11:35:23 +02:00

D Logo Phobos Standard Library

GitHub tag CircleCi Buildkite Code coverage license

Phobos is the standard library that comes with the D Programming Language Compiler.

Download

Phobos is packaged together with the compiler. You should download the whole precompiled package.

To build everything yourself, there is a description in the wiki.

Phobos is distributed under Boost Software Licence. See the licence file.

I Want to Contribute

Great! See the CONTRIBUTING.md file.