diff options
author | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-05-02 15:48:46 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-12-13 16:42:33 +0100 |
commit | 695c4af7c0b9067c90da1783eb51d35ae16addeb (patch) | |
tree | c66da34942418edd29987d4b59c76de9dd55ce72 /chromium/net | |
parent | 6ddd18266b464d633b41893115a0335186750f10 (diff) | |
download | qtwebengine-chromium-695c4af7c0b9067c90da1783eb51d35ae16addeb.tar.gz |
Allow Service Workers without HTTP headers (again)
Service Workers may be loaded over different schemes than HTTP(S)
(chromium itself provides interfaces to register schemes for this!).
Despite this, chromium assumes here, that Service Workers
were always loaded over HTTP(S). The code for registering Service
Workers blindly dereferences the requests "header" pointer
without checking it for NULL beforehand.
Task-number: QTBUG-56169
Change-Id: If7ba87fbf0cc032cc3b3c34d9d4e0d1041c93178
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
Diffstat (limited to 'chromium/net')
-rw-r--r-- | chromium/net/http/http_response_info.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chromium/net/http/http_response_info.cc b/chromium/net/http/http_response_info.cc index 72b007acd8a..9a17f2dd558 100644 --- a/chromium/net/http/http_response_info.cc +++ b/chromium/net/http/http_response_info.cc @@ -466,7 +466,8 @@ void HttpResponseInfo::Persist(base::Pickle* pickle, HttpResponseHeaders::PERSIST_SANS_SECURITY_STATE; } - headers->Persist(pickle, persist_options); + if (headers.get()) + headers->Persist(pickle, persist_options); if (ssl_info.is_valid()) { ssl_info.cert->Persist(pickle); |