zhangqd / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

CEF3: Add response filtering support #515

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Add response filtering support. See 
http://magpcss.org/ceforum/viewtopic.php?f=10&t=645 for CEF3 information.

Original issue reported on code.google.com by magreenb...@gmail.com on 13 Feb 2012 at 7:14

GoogleCodeExporter commented 9 years ago
It would be helpful to support changing of the MIME type sent to the browser. 
Maybe  response->SetMimeType().
Use case: response contains special data identified by special MIME type, for 
example "application/special1". I need to convert special data to HTML and 
display it transparently in the browser. It requires possibility to change 
response MIME type to "text/html", data conversion could be done using 
CefContentFilter.

Original comment by rrrado...@gmail.com on 1 Apr 2013 at 7:26

GoogleCodeExporter commented 9 years ago
@comment#1: if i'm rightly remember, response filtering it is something about 
response rewriting thing (data). but i'm agree, that it is very cool to have 
handle to rewrite even headers.

I.e. it will be cool to allow rewrite whole headers on response, and provide 
filter for data stream.

This is just for clarification. Thanks!

Original comment by fdd...@gmail.com on 1 Apr 2013 at 7:55

GoogleCodeExporter commented 9 years ago
Response headers can be viewed/changed via 
CefNetworkDelegate::OnHeadersReceived(). I'm not sure if there's a great way to 
filter response content -- it may be necessary to subclass URLRequestJob and 
return via CefRequestInterceptor::MaybeInterceptResponse().

Original comment by magreenb...@gmail.com on 27 Jun 2013 at 8:31

GoogleCodeExporter commented 9 years ago
Is this feature being investigated now? I badly need this in my project. If no 
one is working on this yet, I'd like to try provide my patch since I'm not busy 
recently. Though I haven't read CEF3's code in depth, I think this may be not 
quite complicate a task.

Original comment by bandinfi...@gmail.com on 5 Sep 2013 at 9:47

GoogleCodeExporter commented 9 years ago
@comment#4: Patches welcome.

Original comment by magreenb...@gmail.com on 5 Sep 2013 at 3:31

GoogleCodeExporter commented 9 years ago
There is a way around to accomplish this functionality using the existing api 
(GetResourceHandler and URLRequest/URLRequestClient), Marshall has explained 
it on the CEF Forum:

    There's no great way to filter response contents with CEF3 currently. 
    You can use CefResourceHandler via CefRequestHandler::GetResourceHandler 
    and execute the request/return the response contents yourself using 
    CefURLRequest.

http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10794

Original comment by czarek.t...@gmail.com on 12 Sep 2013 at 8:16

GoogleCodeExporter commented 9 years ago
Does the fix in issue 1098 make this any easier? At a glance, they seem 
related...

Original comment by ytp...@gmail.com on 24 Mar 2014 at 9:37

GoogleCodeExporter commented 9 years ago
CEF is transitioning from Google Code to Bitbucket project hosting. If you 
would like to continue receiving notifications on this issue please add 
yourself as a Watcher at the new location: 
https://bitbucket.org/chromiumembedded/cef/issue/515

Original comment by magreenb...@gmail.com on 14 Mar 2015 at 3:21