Merged in bugfix/HTTPASTE-44 (pull request #42)

Bugfix/HTTPASTE-44
This commit is contained in:
Tiara Rodney 2022-04-15 01:55:25 +00:00
commit 3d3d23f6f2
2 changed files with 5 additions and 3 deletions

View file

@ -118,7 +118,7 @@ SEE ALSO
Sources <https://bitbucket.org/victorykit/httpaste> Sources <https://bitbucket.org/victorykit/httpaste>
Host (HTTP) <http://httpaste.it> Host (HTTP) <http://httpaste.it>
(Onion) <http://http://paste77ubkwxy4fqezffsmthxdh3xerwi72tlsw2mch7ecjhw2xn7iyd.onion> (Onion) <http://paste77ubkwxy4fqezffsmthxdh3xerwi72tlsw2mch7ecjhw2xn7iyd.onion>
NOTES NOTES

View file

@ -100,11 +100,13 @@ def get(**kwargs):
else: else:
paste_model.remove(pid, backend.paste) paste_model.remove(pid, backend.paste)
if encoding is not None:
data = data.decode(encoding)
if syntax is not None: if syntax is not None:
data = highlight(data, str(syntax), formatter, linenos) data = highlight(data, str(syntax), formatter, linenos)
if encoding is not None:
data = data.decode(encoding)
return ConnexionResponse( return ConnexionResponse(
status_code=200, status_code=200,