diff options
author | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 17:14:08 +0000 |
---|---|---|
committer | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 17:14:08 +0000 |
commit | 3fd5be900801927ad4d7a8d8d44ebb63e19e90f3 (patch) | |
tree | 47f33c06daf6fd169aa0a3ea12d33ad85223b323 /chrome_frame | |
parent | 4129132ccbbc05abb8bfd89b3d7d5316c4d7d136 (diff) | |
download | chromium_src-3fd5be900801927ad4d7a8d8d44ebb63e19e90f3.zip chromium_src-3fd5be900801927ad4d7a8d8d44ebb63e19e90f3.tar.gz chromium_src-3fd5be900801927ad4d7a8d8d44ebb63e19e90f3.tar.bz2 |
Do not wrap non-HTTP(s) requests.
Review URL: http://codereview.chromium.org/2893015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52494 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/protocol_sink_wrap.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome_frame/protocol_sink_wrap.cc b/chrome_frame/protocol_sink_wrap.cc index 1d20e9b..716e308 100644 --- a/chrome_frame/protocol_sink_wrap.cc +++ b/chrome_frame/protocol_sink_wrap.cc @@ -145,7 +145,13 @@ ScopedComPtr<IBindCtx> BindCtxFromIBindInfo(IInternetBindInfo* bind_info) { } bool ShouldWrapSink(IInternetProtocolSink* sink, const wchar_t* url) { - // TODO(stoyan): check the url scheme for http/https. + // Ignore everything that does not start with http:// or https://. + // |url| is already normalized (i.e. no leading spaces, capital letters in + // protocol etc) and non-null (we check in Hook_Start). + DCHECK(url != NULL); + if ((url != StrStrW(url, L"http://")) && (url != StrStrW(url, L"https://"))) + return false; + ScopedComPtr<IHttpNegotiate> http_negotiate; HRESULT hr = DoQueryService(GUID_NULL, sink, http_negotiate.Receive()); if (http_negotiate && !IsSubFrameRequest(http_negotiate)) |