Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginWbPassThrough.cpp

Issue 4881420963020800: Default to request type SUBDOCUMENT (Closed)
Patch Set: Created Aug. 12, 2014, 1:58 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include "PluginWbPassThrough.h" 3 #include "PluginWbPassThrough.h"
4 #include "PluginClient.h" 4 #include "PluginClient.h"
5 #include "PluginClientFactory.h" 5 #include "PluginClientFactory.h"
6 #ifdef SUPPORT_FILTER 6 #ifdef SUPPORT_FILTER
7 #include "PluginFilter.h" 7 #include "PluginFilter.h"
8 #endif 8 #endif
9 #include "PluginSettings.h" 9 #include "PluginSettings.h"
10 #include "PluginClass.h" 10 #include "PluginClass.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 return CFilter::contentTypeScript; 74 return CFilter::contentTypeScript;
75 } 75 }
76 else if (ext == L".xml") 76 else if (ext == L".xml")
77 { 77 {
78 return CFilter::contentTypeXmlHttpRequest; 78 return CFilter::contentTypeXmlHttpRequest;
79 } 79 }
80 else if (ext == L".swf") 80 else if (ext == L".swf")
81 { 81 {
82 return CFilter::contentTypeObject; 82 return CFilter::contentTypeObject;
83 } 83 }
84 else if (ext == L".jsp" || ext == L".php" || ext == L".html")
85 {
86 return CFilter::contentTypeSubdocument;
87 }
88 else
89 {
90 return CFilter::contentTypeAny & ~CFilter::contentTypeSubdocument;
91 }
92 84
85 return CFilter::contentTypeSubdocument;
Oleksandr 2014/08/12 14:03:01 We don't get any mime type for requests like http:
93 } 86 }
94 87
95 int WBPassthruSink::GetContentType(CString mimeType, CString domain, CString src ) 88 int WBPassthruSink::GetContentType(CString mimeType, CString domain, CString src )
96 { 89 {
97 // No referer or mime type 90 // No referer or mime type
98 // BINDSTRING_XDR_ORIGIN works only for IE v8+ 91 // BINDSTRING_XDR_ORIGIN works only for IE v8+
99 if (mimeType.IsEmpty() && domain.IsEmpty() && CPluginClient::GetInstance()->Ge tIEVersion() >= 8) 92 if (mimeType.IsEmpty() && domain.IsEmpty() && CPluginClient::GetInstance()->Ge tIEVersion() >= 8)
100 { 93 {
101 return CFilter::contentTypeXmlHttpRequest; 94 return CFilter::contentTypeXmlHttpRequest;
102 } 95 }
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, 388 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI,
396 dwReserved, m_spInternetProtocol); 389 dwReserved, m_spInternetProtocol);
397 } 390 }
398 391
399 STDMETHODIMP WBPassthru::Read( /* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULONG *pcbRead) 392 STDMETHODIMP WBPassthru::Read( /* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULONG *pcbRead)
400 { 393 {
401 394
402 WBPassthruSink* pSink = GetSink(); 395 WBPassthruSink* pSink = GetSink();
403 return pSink->Read(pv, cb, pcbRead); 396 return pSink->Read(pv, cb, pcbRead);
404 } 397 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld