summaryrefslogtreecommitdiff
path: root/git-gmi/const.py
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@macaw.me>2020-07-10 20:30:54 +0800
committerFrederick Yin <fkfd@macaw.me>2020-07-10 20:30:54 +0800
commit109ec9a7d86bcadb16541873d95068f737586692 (patch)
tree405116ed82038be22f8fb0a234f57ebd1dc65400 /git-gmi/const.py
parenteb1bd1e074b81a428cb689d3a381e86e2fd530dd (diff)
Enhance blob view
Changes: - set maximum size of displayable blobs - raw blobs are now of type `bytes` - do not try to decode handle binary blobs
Diffstat (limited to 'git-gmi/const.py')
-rw-r--r--git-gmi/const.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-gmi/const.py b/git-gmi/const.py
index 44818c6..f1f757f 100644
--- a/git-gmi/const.py
+++ b/git-gmi/const.py
@@ -2,4 +2,5 @@ STATUS_SUCCESS = "20"
STATUS_NOT_FOUND = "51 NOT FOUND"
STATUS_TEMPORARY_FAILURE = "40 TEMPORARY FAILURE"
META_GEMINI = "text/gemini"
-META_PLAINTEXT = "text/plain" \ No newline at end of file
+META_PLAINTEXT = "text/plain"
+MAX_DISPLAYED_BLOB_SIZE = 500 * 1024 # 500KB