Index: content/browser/service_worker/service_worker_request_handler.cc |
diff --git a/content/browser/service_worker/service_worker_request_handler.cc b/content/browser/service_worker/service_worker_request_handler.cc |
index da735b64d764019e65a045a9767a9155e93ee1f0..6d7d04b2e0a1b99a9101916faee3f4dd1612a9fb 100644 |
--- a/content/browser/service_worker/service_worker_request_handler.cc |
+++ b/content/browser/service_worker/service_worker_request_handler.cc |
@@ -65,8 +65,12 @@ void ServiceWorkerRequestHandler::InitializeHandler( |
RequestContextType request_context_type, |
RequestContextFrameType frame_type, |
scoped_refptr<ResourceRequestBody> body) { |
- if (!OriginCanAccessServiceWorkers(request->url())) |
+ // Create the handler even for insecure HTTP since it's used in the |
+ // case of redirect to HTTPS. |
+ if (!request->url().SchemeIsHTTPOrHTTPS() && |
+ !OriginCanAccessServiceWorkers(request->url())) { |
return; |
+ } |
if (!context_wrapper || !context_wrapper->context() || |
provider_id == kInvalidServiceWorkerProviderId) { |