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):
3131 rev = rev [len ("git" ) :]
3232 url = "https://github.com/python/cpython/commit/" + rev
3333 if url is None :
34- return make_response (
34+ response = make_response (
3535 (
3636 "Usage: /lookup/GITHEXHASH or gitGITHEXHASH "
3737 "(10, 11, or 40 hex characters)\n " ,
@@ -40,6 +40,8 @@ def lookup(rev):
4040 ),
4141 404 ,
4242 )
43+ response .headers ["Content-Type" ] = "text/plain"
44+ return response
4345 else :
4446 return redirect (url , code = 303 )
4547
@@ -60,13 +62,15 @@ def hgrev(repo, rev):
6062 check = True ,
6163 )
6264 except Exception as e :
63- return make_response (
65+ response = make_response (
6466 (
6567 f"{ str (e )} \n "
6668 "Usage: path/to/hg/repo/rev/HGHEXNODE "
6769 "(12 or 40 hex characters)\n "
6870 ),
6971 404 ,
7072 )
73+ response .headers ["Content-Type" ] = "text/plain"
74+ return response
7175
7276 return make_response (result .stdout , 200 )
You can’t perform that action at this time.
0 commit comments