upload: Attempt to guess character set text/* which are served inline.

This is only `text/plain`, currently.  In such cases where the
client-provided content-type also does not specify a `charset`, we use
`chardet` to make a guess, and store that guess to provide later when
serving the content.  The detection is done in a streaming fashion,
and thus should not require re-downloading the full content.
This commit is contained in:
Alex Vandiver
2025-07-18 05:55:07 +00:00
committed by Tim Abbott
parent ae001dfa96
commit 25fbb05fea
10 changed files with 76 additions and 20 deletions

View File

@@ -49,4 +49,4 @@ API_FEATURE_LEVEL = 408
# historical commits sharing the same major version, in which case a
# minor version bump suffices.
PROVISION_VERSION = (337, 1) # bumped 2025-07-21 to upgrade shfmt
PROVISION_VERSION = (338, 0) # bumped 2025-07-18 to add chardet and remove types-chardet