Skip to content

Commit 0137253

Browse files
authored
[HotFix] changed permanent redirect [301] to temporal [307] & emproving a little bit reload and redirect (#11)
1 parent b1e33ec commit 0137253

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pypulse/Template/redirect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def render_template(self, request):
1313
print(f'If you want to reload the current view, use `Reload`.')
1414
exit(1)
1515

16-
request.send_response(301)
16+
request.send_response(307)
1717
request.send_header(
18-
'Location', f'http://localhost:{Vars.INTERNAL_HTTP_SERVER_PORT}' + self.path)
18+
'Location', self.path)
1919
return None, True

pypulse/Template/reload.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def render_template(self, request):
1717
f'Path `{request.path}` returns reload in a loop (infinite recursion).')
1818
exit(1)
1919

20-
request.send_response(301)
20+
request.send_response(307)
2121
request.send_header(
22-
'Location', f'http://localhost:{Vars.INTERNAL_HTTP_SERVER_PORT}' + request.path)
22+
'Location', request.path)
2323
return None, True

0 commit comments

Comments
 (0)