Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Enrico Tröger enrico.troeger@uvena.de Date: Sun, 14 Apr 2019 22:53:31 UTC Commit: 0819b0be4b720fac047f63d95aef179609bdcb9e https://github.com/geany/www.geany.org/commit/0819b0be4b720fac047f63d95aef17...
Log Message: ----------- Fix spurious trailing slash and decode bytes in Pastebin API response
Modified Paths: -------------- pastebin/templates/pastebin/api.html pastebin/views.py
Modified: pastebin/templates/pastebin/api.html 3 lines changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -31,7 +31,8 @@ <h1>API</h1> encoded_data, ) response = urllib.request.urlopen(request) - print(response.read()[:-1]) + response_content = response.read() + print(response_content.decode())
if __name__ == '__main__': paste_code()</pre>
Modified: pastebin/views.py 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -200,7 +200,7 @@ def post(self, request):
site = self._get_site(request) absolute_url = snippet.get_absolute_url() - result = 'https://%s%s/' % (site.domain, absolute_url) + result = 'https://%7B%7D%7B%7D%27.format(site.domain, absolute_url) return HttpResponse(result, content_type='text/plain')
# ----------------------------------------------------------------------
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).