Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9648)

Issue 9836043: Create a redirecting http server

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by bac
Modified:
10 years, 10 months ago
Reviewers:
benji, mp+166092, gary.poster
Visibility:
Public.

Description

Create a redirecting http server For 'make prod' and 'make devel', the use of the SimpleHTTPServer fails if a path not represented on the file server is entered directly into the address field. This situation occurs if one manually enters a namespace (e.g. ':gui:') or uses a feature flag. This branch adds a small wrapper python program that returns '/index.html' if the path does not exist on the file system. This approach isn't perfect as you get shunted back to the front page. https://code.launchpad.net/~bac/juju-gui/httpserver/+merge/166092 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 16

Patch Set 2 : Create a redirecting http server #

Total comments: 1

Patch Set 3 : Create a redirecting http server #

Unified diffs Side-by-side diffs Delta from patch set Stats (+179 lines, -3 lines) Patch
M .bzrignore View 1 chunk +0 lines, -1 line 0 comments Download
M Makefile View 1 2 chunks +3 lines, -2 lines 0 comments Download
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A bin/http_server.py View 1 2 1 chunk +47 lines, -0 lines 0 comments Download
M test/test_deploy_charm_for_testing.py View 1 chunk +16 lines, -0 lines 0 comments Download
A test/test_http_server.py View 1 2 1 chunk +111 lines, -0 lines 0 comments Download

Messages

Total messages: 5
bac
Please take a look.
10 years, 10 months ago (2013-05-28 16:14:32 UTC) #1
benji
Thanks for doing this. The test servers not doing this has irritated me more than ...
10 years, 10 months ago (2013-05-28 16:45:13 UTC) #2
bac
Please take a look. https://codereview.appspot.com/9836043/diff/1/Makefile File Makefile (right): https://codereview.appspot.com/9836043/diff/1/Makefile#newcode453 Makefile:453: #cd build-prod && python -m ...
10 years, 10 months ago (2013-05-28 18:15:31 UTC) #3
gary.poster
LGTM with trivial. Thank you! Gary https://codereview.appspot.com/9836043/diff/6002/bin/http_server.py File bin/http_server.py (right): https://codereview.appspot.com/9836043/diff/6002/bin/http_server.py#newcode29 bin/http_server.py:29: class RedirectingHTTPRequestHandler(SimpleHTTPRequestHandler): Technically, ...
10 years, 10 months ago (2013-05-28 20:10:33 UTC) #4
bac
10 years, 10 months ago (2013-05-28 20:23:17 UTC) #5
*** Submitted:

Create a redirecting http server

For 'make prod' and 'make devel', the use of the SimpleHTTPServer fails if a
path not represented on the file server is entered directly into the address
field.  This situation occurs if one manually enters a namespace
(e.g. ':gui:') or uses a feature flag.

This branch adds a small wrapper python program that returns '/index.html'
if the path does not exist on the file system.  This approach isn't perfect as
you get shunted back to the front page.

R=benji, gary.poster
CC=
https://codereview.appspot.com/9836043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b