Closed GoogleCodeExporter closed 9 years ago
Confirmed behavior with v195.
Original comment by JoeAndr...@gmail.com
on 2 Mar 2011 at 5:22
Ok. Here's a patch, with comments added to cef.h.
Let me know if it works.
Original comment by JoeAndr...@gmail.com
on 4 Mar 2011 at 12:44
Attachments:
Btw, I meant, let me know if you need any changes to the patch. It does
function properly. I tested a custom non-standard scheme against the a-d test
cases above.
Original comment by JoeAndr...@gmail.com
on 4 Mar 2011 at 6:02
Support for non-standard schemes committed as revision 199.
I was unable to duplicate your null origin bypass results with either standard
or non-standard schemes. This is what I did:
1. Change the CefRegisterScheme call in scheme_test.cpp.
2. Load tests/cefclient/res/xmlhttprequest.html via the file:// protocol.
3. Try to load the following URLs via XHR:
client://tests/handler.html
client:///tests/handler.html
client:tests/handler.html
All failed with the following console message:
Message: XMLHttpRequest cannot load client://tests/handler.html. Origin null is
not allowed by Access-Control-Allow-Origin.
Original comment by magreenb...@gmail.com
on 4 Mar 2011 at 5:57
Interesting. It works on my set up.
How are you loading tests/cefclient/res/xmlhttprequest.html?
I am loading it as a file:// URL parameter in the call to Cef::CreateBrowser.
That must be triggering a different security context.
Also, here's an test html file for custom schemes. It assumes both "custom" and
"standard" are registered schemes in scheme_test.cpp.
Original comment by JoeAndr...@gmail.com
on 4 Mar 2011 at 10:28
Attachments:
Ok. That was a little early to say that it works. I should have said it makes
it to my handler. It does not make it back to the AJAX caller.
Diving into WebKit (and asking on webkit-dev), it looks like the right answer
is to set the Access-Control-Allow-Origin header. I tried setting it in the
request header sent to ProcessRequest, but that didn't make it back with the
response.
How might this be accomplished?
Original comment by JoeAndr...@gmail.com
on 20 Mar 2011 at 12:48
Original issue reported on code.google.com by
JoeAndr...@gmail.com
on 28 Feb 2011 at 7:16