Skip to content
This repository was archived by the owner on Apr 26, 2021. It is now read-only.

Commit b416740

Browse files
committed
one cannot do is and is not comparisons on strings
This prevented the check from succeeding, adding the Content-Disposition header at all times.
1 parent abc7f1a commit b416740

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cuckoo/web/analysis/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def file(request, category, object_id, fetch="fetch"):
229229

230230
response = HttpResponse(file_item.read(), content_type=content_type)
231231

232-
if fetch is not "nofetch":
232+
if fetch != "nofetch":
233233
response["Content-Disposition"] = "attachment; filename=%s" % file_name
234234

235235
return response

0 commit comments

Comments
 (0)