annotate .hgignore @ 8908:8993d401575b stable

files: fix raw download of repo files with names with unicode points above 256 in name Raw download had apparently only been tested with non-ascii characters that were latin1. That was apparently a (too) simple case that worked without crashing. Files with unicode code points above 256 in their name would fail to download, when Waitress failed like this, trying to get a real byte string by encoding WSGI headers to latin1: UnicodeEncodeError: 'latin-1' codec can't encode characters in position 84-85: ordinal not in range(256) HTTP headers are of course byte strings on the network, but Python3 WSGI does unfortunately neither expose it as bytes nor as unicode strings to be encoded as utf-8. Instead, it uses unicode strings with byte values encoded as code points 0-255. That is achieved by decoding the utf-8 encoded bytes as latin1. For raw downloads, the recommended download filename is provided in the Content-Disposition header. The problem is that it was provided as a real unicode string. Fixed by applying the "proper" latin1-decoding of a utf8-encoding.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 07 Feb 2022 19:07:08 +0100
parents 278cc5936ed5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
848
a555d8345105 Small hgignore update
Lukasz Balcerzak <lukasz.balcerzak@python-center.org>
parents: 554
diff changeset
1 syntax: glob
a555d8345105 Small hgignore update
Lukasz Balcerzak <lukasz.balcerzak@python-center.org>
parents: 554
diff changeset
2 *.pyc
a555d8345105 Small hgignore update
Lukasz Balcerzak <lukasz.balcerzak@python-center.org>
parents: 554
diff changeset
3 *.swp
1971
3dd89d30cd28 ignore sqlite files
Marcin Kuzminski <marcin@python-works.com>
parents: 1893
diff changeset
4 *.sqlite
2555
b5c57e2176dc ignore tox stuff
Marcin Kuzminski <marcin@python-works.com>
parents: 2379
diff changeset
5 *.tox
1236
a28bd9cb6549 added egg-info,and .egg in hgignore
Marcin Kuzminski <marcin@python-works.com>
parents: 848
diff changeset
6 *.egg-info
a28bd9cb6549 added egg-info,and .egg in hgignore
Marcin Kuzminski <marcin@python-works.com>
parents: 848
diff changeset
7 *.egg
4986
7d6c4bd58abd i18n: don't include .mo files in the repo - build them on demand
Mads Kiilerich <madski@unity3d.com>
parents: 4902
diff changeset
8 *.mo
7884
17b86a2976ca hgignore: *.orig and *.rej as created by hg when using revert, import, mq, etc
Mads Kiilerich <mads@kiilerich.com>
parents: 7845
diff changeset
9 *.orig
17b86a2976ca hgignore: *.orig and *.rej as created by hg when using revert, import, mq, etc
Mads Kiilerich <mads@kiilerich.com>
parents: 7845
diff changeset
10 *.rej
7758
f0013f65982d hgignore: ignore *.bak - such files are created by tools like 2to3
Mads Kiilerich <mads@kiilerich.com>
parents: 7467
diff changeset
11 *.bak
4997
9885bbacf99c .hgignore: Add .eggs/ and tarballcache/
Marc Abramowitz <marc@marc-abramowitz.com>
parents: 4986
diff changeset
12 .eggs/
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
13
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
14 syntax: regexp
8749
5dd9cf56f09e hgignore: cleanup
Mads Kiilerich <mads@kiilerich.com>
parents: 8634
diff changeset
15 ^extensions\.py$
5dd9cf56f09e hgignore: cleanup
Mads Kiilerich <mads@kiilerich.com>
parents: 8634
diff changeset
16 ^build$
5dd9cf56f09e hgignore: cleanup
Mads Kiilerich <mads@kiilerich.com>
parents: 8634
diff changeset
17 ^dist$
5dd9cf56f09e hgignore: cleanup
Mads Kiilerich <mads@kiilerich.com>
parents: 8634
diff changeset
18 ^docs/build$
5dd9cf56f09e hgignore: cleanup
Mads Kiilerich <mads@kiilerich.com>
parents: 8634
diff changeset
19 ^docs/_build$
9
058f63b6c2ff added hgignore
Marcin Kuzminski
parents: 0
diff changeset
20 ^data$
8749
5dd9cf56f09e hgignore: cleanup
Mads Kiilerich <mads@kiilerich.com>
parents: 8634
diff changeset
21 ^sql_dumps$
9
058f63b6c2ff added hgignore
Marcin Kuzminski
parents: 0
diff changeset
22 ^\.settings$
058f63b6c2ff added hgignore
Marcin Kuzminski
parents: 0
diff changeset
23 ^\.project$
72
596eb21f61d5 ignore db file
Marcin Kuzminski <marcin@python-blog.com>
parents: 9
diff changeset
24 ^\.pydevproject$
1893
27c8836e6356 ignore coverage and my local dev.ini file
Marcin Kuzminski <marcin@python-works.com>
parents: 1833
diff changeset
25 ^\.coverage$
7459
19a9f02443c8 front-end: Introduce 'front-end' directory with source files for building the front-end
Mads Kiilerich <mads@kiilerich.com>
parents: 7455
diff changeset
26 ^kallithea/front-end/node_modules$
19a9f02443c8 front-end: Introduce 'front-end' directory with source files for building the front-end
Mads Kiilerich <mads@kiilerich.com>
parents: 7455
diff changeset
27 ^kallithea/front-end/package-lock\.json$
7845
3b54bcf6d128 front-end: fix documentation regarding theme.less file
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents: 7758
diff changeset
28 ^kallithea/front-end/theme\.less$
7460
7ec976c8c198 front-end: Store temporary files in a tmp directory
Mads Kiilerich <mads@kiilerich.com>
parents: 7459
diff changeset
29 ^kallithea/front-end/tmp$
7466
bf514091b27f front-end: Use codemirror from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents: 7465
diff changeset
30 ^kallithea/public/codemirror$
7464
12455b1a1a6f front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents: 7463
diff changeset
31 ^kallithea/public/css/select2-spinner\.gif$
12455b1a1a6f front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents: 7463
diff changeset
32 ^kallithea/public/css/select2\.png$
12455b1a1a6f front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents: 7463
diff changeset
33 ^kallithea/public/css/select2x2\.png$
12455b1a1a6f front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents: 7463
diff changeset
34 ^kallithea/public/css/style\.css$
12455b1a1a6f front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents: 7463
diff changeset
35 ^kallithea/public/css/style\.css\.map$
7462
585dee5eb4bb front-end: Use the existing bootstrap.js from node_modules and stop bundling Bootstrap
Mads Kiilerich <mads@kiilerich.com>
parents: 7460
diff changeset
36 ^kallithea/public/js/bootstrap\.js$
7465
cc2c473abc5f front-end: Use DataTables from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents: 7464
diff changeset
37 ^kallithea/public/js/dataTables\.bootstrap\.js$
7467
2e7ffb755d4f front-end: use At.js for MentionsAutoComplete
domruf <dominikruf@gmail.com>
parents: 7466
diff changeset
38 ^kallithea/public/js/jquery\.atwho\.min\.js$
2e7ffb755d4f front-end: use At.js for MentionsAutoComplete
domruf <dominikruf@gmail.com>
parents: 7466
diff changeset
39 ^kallithea/public/js/jquery\.caret\.min\.js$
7465
cc2c473abc5f front-end: Use DataTables from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents: 7464
diff changeset
40 ^kallithea/public/js/jquery\.dataTables\.js$
7463
2b8f69cb7d8c front-end: Use jQuery and Flot from node_modules and stop bundling them
Mads Kiilerich <mads@kiilerich.com>
parents: 7462
diff changeset
41 ^kallithea/public/js/jquery\.flot\.js$
2b8f69cb7d8c front-end: Use jQuery and Flot from node_modules and stop bundling them
Mads Kiilerich <mads@kiilerich.com>
parents: 7462
diff changeset
42 ^kallithea/public/js/jquery\.flot\.selection\.js$
2b8f69cb7d8c front-end: Use jQuery and Flot from node_modules and stop bundling them
Mads Kiilerich <mads@kiilerich.com>
parents: 7462
diff changeset
43 ^kallithea/public/js/jquery\.flot\.time\.js$
2b8f69cb7d8c front-end: Use jQuery and Flot from node_modules and stop bundling them
Mads Kiilerich <mads@kiilerich.com>
parents: 7462
diff changeset
44 ^kallithea/public/js/jquery\.min\.js$
7464
12455b1a1a6f front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents: 7463
diff changeset
45 ^kallithea/public/js/select2\.js$
4210
277684f23146 Rename some strings in defaults found in config files
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4181
diff changeset
46 ^kallithea\.db$
460
92cacbcb5272 ignore test db
Marcin Kuzminski <marcin@python-works.com>
parents: 327
diff changeset
47 ^test\.db$
4212
24c0d584ba86 General renaming to Kallithea
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4210
diff changeset
48 ^Kallithea\.egg-info$
4902
03bbd33bc084 docs: rework stuff
Mads Kiilerich <madski@unity3d.com>
parents: 4212
diff changeset
49 ^my\.ini$
8749
5dd9cf56f09e hgignore: cleanup
Mads Kiilerich <mads@kiilerich.com>
parents: 8634
diff changeset
50 ^fabfile\.py$
3831
bd39c1f70e35 Updated hgignore to skip .idea config files
Marcin Kuzminski <marcin@python-works.com>
parents: 3051
diff changeset
51 ^\.idea$
5516
bfa66e8887d7 hgignore: ignore `.cache/`, created by pytest 2.8 when writing `.cache/v/cache/lastfailed`
Mads Kiilerich <madski@unity3d.com>
parents: 5416
diff changeset
52 ^\.cache$
7455
42163501d6b5 hgignore: .pytest_cache
Mads Kiilerich <mads@kiilerich.com>
parents: 7438
diff changeset
53 ^\.pytest_cache$
8634
6bab917402b4 docs: when using venv with a clone, recommend using 'venv' as location
Mads Kiilerich <mads@kiilerich.com>
parents: 8614
diff changeset
54 ^venv$
6038
9358211ee144 tests: move test data to top level 'data' folder - make grepping in kallithea/ easier
Mads Kiilerich <madski@unity3d.com>
parents: 5516
diff changeset
55 /__pycache__$
8772
52816813cbec docs: describe, visualize, and verify internal code structure and layering
Mads Kiilerich <mads@kiilerich.com>
parents: 8749
diff changeset
56 ^deps\.dot$
52816813cbec docs: describe, visualize, and verify internal code structure and layering
Mads Kiilerich <mads@kiilerich.com>
parents: 8749
diff changeset
57 ^deps\.svg$
52816813cbec docs: describe, visualize, and verify internal code structure and layering
Mads Kiilerich <mads@kiilerich.com>
parents: 8749
diff changeset
58 ^deps\.txt$
8854
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 8772
diff changeset
59 ^\.pytype/