File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def lookup(rev):
31
31
rev = rev [len ("git" ) :]
32
32
url = "https://github.com/python/cpython/commit/" + rev
33
33
if url is None :
34
- return make_response (
34
+ response = make_response (
35
35
(
36
36
"Usage: /lookup/GITHEXHASH or gitGITHEXHASH "
37
37
"(10, 11, or 40 hex characters)\n " ,
@@ -40,6 +40,8 @@ def lookup(rev):
40
40
),
41
41
404 ,
42
42
)
43
+ response .headers ["Content-Type" ] = "text/plain"
44
+ return response
43
45
else :
44
46
return redirect (url , code = 303 )
45
47
@@ -60,13 +62,15 @@ def hgrev(repo, rev):
60
62
check = True ,
61
63
)
62
64
except Exception as e :
63
- return make_response (
65
+ response = make_response (
64
66
(
65
67
f"{ str (e )} \n "
66
68
"Usage: path/to/hg/repo/rev/HGHEXNODE "
67
69
"(12 or 40 hex characters)\n "
68
70
),
69
71
404 ,
70
72
)
73
+ response .headers ["Content-Type" ] = "text/plain"
74
+ return response
71
75
72
76
return make_response (result .stdout , 200 )
You can’t perform that action at this time.
0 commit comments