plain 0.2.4__py3-none-any.whl → 0.2.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plain/assets/views.py +8 -4
- {plain-0.2.4.dist-info → plain-0.2.5.dist-info}/METADATA +1 -1
- {plain-0.2.4.dist-info → plain-0.2.5.dist-info}/RECORD +6 -6
- {plain-0.2.4.dist-info → plain-0.2.5.dist-info}/LICENSE +0 -0
- {plain-0.2.4.dist-info → plain-0.2.5.dist-info}/WHEEL +0 -0
- {plain-0.2.4.dist-info → plain-0.2.5.dist-info}/entry_points.txt +0 -0
plain/assets/views.py
CHANGED
@@ -128,10 +128,8 @@ class AssetView(View):
|
|
128
128
|
headers["Vary"] = vary + ", Accept-Encoding"
|
129
129
|
|
130
130
|
# If the file is compressed, tell the browser
|
131
|
-
if
|
132
|
-
headers.setdefault("Content-Encoding",
|
133
|
-
elif path.endswith(".br"):
|
134
|
-
headers.setdefault("Content-Encoding", "br")
|
131
|
+
if encoding := mimetypes.guess_type(path)[1]:
|
132
|
+
headers.setdefault("Content-Encoding", encoding)
|
135
133
|
|
136
134
|
is_immutable = self.is_immutable(path)
|
137
135
|
|
@@ -151,6 +149,12 @@ class AssetView(View):
|
|
151
149
|
if etag := self.get_etag(path):
|
152
150
|
headers.setdefault("ETag", etag)
|
153
151
|
|
152
|
+
if "Content-Disposition" in headers:
|
153
|
+
# This header messes up Safari...
|
154
|
+
# https://github.com/evansd/whitenoise/commit/93657cf88e14b919cb726864814617a6a639e507
|
155
|
+
# At some point, should probably look at not using FileResponse at all?
|
156
|
+
del headers["Content-Disposition"]
|
157
|
+
|
154
158
|
return headers
|
155
159
|
|
156
160
|
def is_immutable(self, path):
|
@@ -6,7 +6,7 @@ plain/assets/compile.py,sha256=lsnciN85YjHe6d8VIKJi1L8r7NGHNzMOe9L87wObM5I,3287
|
|
6
6
|
plain/assets/finders.py,sha256=WEKAnXTmpuQ7UKLZz7vHPrKFdDOkuZSP6_JTKmIxrKg,1268
|
7
7
|
plain/assets/fingerprints.py,sha256=1NKAnnXVlncY5iimXztr0NL3RIjBKsNlZRIe6nmItJc,931
|
8
8
|
plain/assets/urls.py,sha256=ZTIoM1Zq35JaXZ3wFhXhfGa7VoITDNlH9i5RS0R5xow,933
|
9
|
-
plain/assets/views.py,sha256=
|
9
|
+
plain/assets/views.py,sha256=dhjIpMu0GDR_VGbXM90_6RnC84C2C4bFv1RxDVklGBk,9173
|
10
10
|
plain/cli/README.md,sha256=bEp9B9C92YEa44wN2IywTmNZsYBv_uGq9AS_bBiAGdY,2580
|
11
11
|
plain/cli/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
|
12
12
|
plain/cli/cli.py,sha256=JyPNQGlczqCyLxZq5Jh_591rKpBMN91JHGXdaTuPWJ0,14841
|
@@ -152,8 +152,8 @@ plain/views/objects.py,sha256=9QBYyb8PgkRirXCQ8-Pms4_yMzP37dfeL30hWRYmtZg,7909
|
|
152
152
|
plain/views/redirect.py,sha256=KLnlktzK6ZNMTlaEiZpMKQMEP5zeTgGLJ9BIkIJfwBo,1733
|
153
153
|
plain/views/templates.py,sha256=nF9CcdhhjAyp3LB0RrSYnBaHpHzMfPSw719RCdcXk7o,2007
|
154
154
|
plain/wsgi.py,sha256=R6k5FiAElvGDApEbMPTT0MPqSD7n2e2Az5chQqJZU0I,236
|
155
|
-
plain-0.2.
|
156
|
-
plain-0.2.
|
157
|
-
plain-0.2.
|
158
|
-
plain-0.2.
|
159
|
-
plain-0.2.
|
155
|
+
plain-0.2.5.dist-info/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
|
156
|
+
plain-0.2.5.dist-info/METADATA,sha256=KyaK66wyLHe9OHXObllwbTbUPmyk6jNqTGRo-yOJkkI,2716
|
157
|
+
plain-0.2.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
158
|
+
plain-0.2.5.dist-info/entry_points.txt,sha256=7O1RZTmMasKYB73bfqQcTwIhsXo7RjEIKv2WbtTtOIM,39
|
159
|
+
plain-0.2.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|