Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Issue 953353002: Add HTTP handler that redirects requests for Mojo apps (Closed)

Created:
5 years, 10 months ago by blundell
Modified:
5 years, 9 months ago
Reviewers:
etiennej, qsr
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@python_data_pipe_utils
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Add HTTP handler that redirects requests for Mojo apps This CL adds an HTTP handler whose purpose is to redirect requests for Mojo apps to the locations of the current versions of the binaries. It installs itself as a handler for all requests and operates as follows: (1) Ensure that the request is of the form "/platform/app", e.g., "/linux-x64/view_manager.mojo". (2) Load the file containing the up-to-date version of the requested app, which resides in a known location for the app and platform, e.g., "https://storage.googleapis.com/mojo/services/linux-x64/view_manager_location". (3) Return a redirect to the contents of that file. The expected usage of this app is to make it accessible from a server such as https://foo.com and then to direct the Mojo shell to send requests for mojo: apps to this server, e.g. "--origin=https://foo.com/linux-64". Note that the platform must be specified explicitly since the shell does not send that information at this time. R=qsr@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/3a9bcfc3676aea5ac38f06f434a7c0827dfc9dbe

Patch Set 1 #

Total comments: 16

Patch Set 2 : Response to review #

Total comments: 10

Patch Set 3 : Response to review + update #

Total comments: 7

Patch Set 4 : Response to review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -14 lines) Patch
M services/BUILD.gn View 1 1 chunk +1 line, -1 line 0 comments Download
A + services/python/BUILD.gn View 1 1 chunk +4 lines, -4 lines 0 comments Download
A + services/python/mojo_url_redirector/BUILD.gn View 1 1 chunk +5 lines, -9 lines 0 comments Download
A services/python/mojo_url_redirector/__mojo__.py View 1 2 3 1 chunk +174 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
blundell
I've left in the print statements that I was using for debugging because I'd like ...
5 years, 10 months ago (2015-02-25 15:06:18 UTC) #2
qsr
On 2015/02/25 15:06:18, blundell wrote: > I've left in the print statements that I was ...
5 years, 10 months ago (2015-02-25 15:27:05 UTC) #3
qsr
https://codereview.chromium.org/953353002/diff/1/services/mojo_url_redirector/BUILD.gn File services/mojo_url_redirector/BUILD.gn (right): https://codereview.chromium.org/953353002/diff/1/services/mojo_url_redirector/BUILD.gn#newcode21 services/mojo_url_redirector/BUILD.gn:21: "//mojo/public/python:mojo_system", I'm surprised you need this. https://codereview.chromium.org/953353002/diff/1/services/mojo_url_redirector/__mojo__.py File services/mojo_url_redirector/__mojo__.py ...
5 years, 10 months ago (2015-02-25 15:34:07 UTC) #4
blundell
Thanks for the review! https://codereview.chromium.org/953353002/diff/1/services/mojo_url_redirector/BUILD.gn File services/mojo_url_redirector/BUILD.gn (right): https://codereview.chromium.org/953353002/diff/1/services/mojo_url_redirector/BUILD.gn#newcode21 services/mojo_url_redirector/BUILD.gn:21: "//mojo/public/python:mojo_system", On 2015/02/25 15:34:07, qsr ...
5 years, 10 months ago (2015-02-26 13:29:53 UTC) #6
qsr
https://codereview.chromium.org/953353002/diff/40001/services/python/mojo_url_redirector/__mojo__.py File services/python/mojo_url_redirector/__mojo__.py (right): https://codereview.chromium.org/953353002/diff/40001/services/python/mojo_url_redirector/__mojo__.py#newcode109 services/python/mojo_url_redirector/__mojo__.py:109: status, app_location = data_pipe_utils.BlockingCopyFromDataPipeIntoString( So, yes, I really think ...
5 years, 10 months ago (2015-02-26 14:27:06 UTC) #7
etiennej
https://codereview.chromium.org/953353002/diff/40001/services/python/mojo_url_redirector/__mojo__.py File services/python/mojo_url_redirector/__mojo__.py (right): https://codereview.chromium.org/953353002/diff/40001/services/python/mojo_url_redirector/__mojo__.py#newcode57 services/python/mojo_url_redirector/__mojo__.py:57: logging.info("Handling request for " + request.relative_url) I don't think ...
5 years, 10 months ago (2015-02-26 14:57:46 UTC) #8
blundell
Changed to build on the data_pipe_utils API that returns a Promise. Etienne, I will address ...
5 years, 10 months ago (2015-02-26 16:35:32 UTC) #9
blundell
All comments addressed. https://codereview.chromium.org/953353002/diff/40001/services/python/mojo_url_redirector/__mojo__.py File services/python/mojo_url_redirector/__mojo__.py (right): https://codereview.chromium.org/953353002/diff/40001/services/python/mojo_url_redirector/__mojo__.py#newcode57 services/python/mojo_url_redirector/__mojo__.py:57: logging.info("Handling request for " + request.relative_url) ...
5 years, 9 months ago (2015-03-04 14:22:54 UTC) #13
qsr
LGTM with nit. https://codereview.chromium.org/953353002/diff/120001/services/python/mojo_url_redirector/__mojo__.py File services/python/mojo_url_redirector/__mojo__.py (right): https://codereview.chromium.org/953353002/diff/120001/services/python/mojo_url_redirector/__mojo__.py#newcode8 services/python/mojo_url_redirector/__mojo__.py:8: import functools Not needed anymore. https://codereview.chromium.org/953353002/diff/120001/services/python/mojo_url_redirector/__mojo__.py#newcode92 ...
5 years, 9 months ago (2015-03-04 14:40:38 UTC) #14
blundell
https://codereview.chromium.org/953353002/diff/120001/services/python/mojo_url_redirector/__mojo__.py File services/python/mojo_url_redirector/__mojo__.py (right): https://codereview.chromium.org/953353002/diff/120001/services/python/mojo_url_redirector/__mojo__.py#newcode8 services/python/mojo_url_redirector/__mojo__.py:8: import functools On 2015/03/04 14:40:37, qsr wrote: > Not ...
5 years, 9 months ago (2015-03-04 15:00:21 UTC) #15
blundell
5 years, 9 months ago (2015-03-04 15:05:00 UTC) #16
Message was sent while issue was closed.
Committed patchset #4 (id:140001) manually as
3a9bcfc3676aea5ac38f06f434a7c0827dfc9dbe (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698