summaryrefslogtreecommitdiff
path: root/git-gmi/gateway.py
diff options
context:
space:
mode:
Diffstat (limited to 'git-gmi/gateway.py')
-rw-r--r--git-gmi/gateway.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-gmi/gateway.py b/git-gmi/gateway.py
index 29f0268..b0c9b0a 100644
--- a/git-gmi/gateway.py
+++ b/git-gmi/gateway.py
@@ -2,6 +2,7 @@ from git import *
from const import *
from config import *
from os import environ, listdir
+import sys
# be careful when using print(); stdout is passed to the client.
# this cgi uses \n as newline.
@@ -56,7 +57,7 @@ def handle_cgi_request(path: str, query: str):
except FileNotFoundError: # is file
try:
if query == "raw":
- print(repo.view_raw_blob(branch, location))
+ sys.stdout.buffer.write(repo.view_raw_blob(branch, location))
else:
print(repo.view_blob(branch, location))
except FileNotFoundError: