CefURLRequest redirect

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CefURLRequest redirect

Postby rado » Sat Dec 05, 2015 6:00 am

I'm using CefURLRequest to achieve requests filtering as recomended here http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10794#p17348.
The problem is when request is redirected. It seems it is done in CefURLRequest transparently, I don't receive response code 301, just 200 with new content so browser does not know that URL/domain was changed and some thongs stop working. Is there some way how to solve it? Thank you.
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am

Re: CefURLRequest redirect

Postby rado » Sun Dec 06, 2015 2:51 pm

I've found there is already ticket for this
https://bitbucket.org/chromiumembedded/cef/issues/1329
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am

Re: CefURLRequest redirect

Postby buglloc » Wed Dec 09, 2015 2:34 am

For myself, I just patched and adding this flag. Maybe this would help you.
Patch: https://github.com/buglloc/cef-builds/b ... rect.patch
buglloc
Newbie
 
Posts: 3
Joined: Wed Jan 21, 2015 10:12 am

Re: CefURLRequest redirect

Postby magreenblatt » Wed Dec 09, 2015 1:20 pm

buglloc wrote:For myself, I just patched and adding this flag. Maybe this would help you.
Patch: https://github.com/buglloc/cef-builds/b ... rect.patch

Can you submit a pull request against current master branch with your changes?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CefURLRequest redirect

Postby buglloc » Wed Dec 09, 2015 2:01 pm

magreenblatt wrote:Can you submit a pull request against current master branch with your changes?

Sure, i'll submit it at weekends.
I also have another patch for CefResponse: https://github.com/buglloc/cef-builds/b ... onse.patch
It added new method CefResponse::GetUrl - returns "effective url", analogue http://curl.haxx.se/libcurl/c/CURLINFO_EFFECTIVE_URL.html. Use case - get's document url resolved after redirects or changed as a result of HSTS.
If you want - i'll submit it too (of course as separated PR).
buglloc
Newbie
 
Posts: 3
Joined: Wed Jan 21, 2015 10:12 am

Re: CefURLRequest redirect

Postby magreenblatt » Wed Dec 09, 2015 2:23 pm

buglloc wrote:
magreenblatt wrote:Can you submit a pull request against current master branch with your changes?

Sure, i'll submit it at weekends.
I also have another patch for CefResponse: https://github.com/buglloc/cef-builds/b ... onse.patch
It added new method CefResponse::GetUrl - returns "effective url", analogue http://curl.haxx.se/libcurl/c/CURLINFO_EFFECTIVE_URL.html. Use case - get's document url resolved after redirects or changed as a result of HSTS.
If you want - i'll submit it too (of course as separated PR).

Sounds useful, but perhaps call it GetEffectiveURL().
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CefURLRequest redirect

Postby buglloc » Wed Dec 09, 2015 2:32 pm

magreenblatt wrote:Sounds useful, but perhaps call it GetEffectiveURL().

OK, then I submit it on the weekends, too. Maybe you're right and GetEffectiveURL() more correct name.
buglloc
Newbie
 
Posts: 3
Joined: Wed Jan 21, 2015 10:12 am

Re: CefURLRequest redirect

Postby rado » Sat Dec 12, 2015 12:02 pm

Thanks guys
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am

Re: CefURLRequest redirect

Postby rado » Fri Dec 08, 2017 3:40 pm

I had pause on project for longer time so I didn't follow this. Now I still cannot find neither the GetUrl() nor GetEffectiveURL in latest branch 3239. Was this fix abandoned?
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 53 guests