El mar, 20-10-2015 a las 10:44 +0200, Jon Forsberg escribió: > Hello! > I'm using webkit2gtk to create a restricted web browser and I would > like to be able to choose which HTTP methods to allow (for both page > navigation and resource loading). For example I might want to allow > GET and HEAD but not POST as a way to limit interaction with web > pages. I have looked at the resource-load-started and decide- > policy signals and the WebKitWebResource, WebKitURIRequest and > WebKitURIResponse classes but it seems the closest you can get is a > SoupMessageHeaders (which contains the headers but not the method). > Am i missing something or is it not possible to find out the method > of a request?
No, you aren't. It's not exposed, but it should be easy to add a webkit_uri_request_get_http_method() or something similar. Note that to block requests, you need to use a web process extension and connect to WebKitWebPage::send-request signal. Feel free to file a bug report to request this, if you can provide a patch it would be even better :-) > Thanks > > _______________________________________________ > webkit-gtk mailing list > [email protected] > https://lists.webkit.org/mailman/listinfo/webkit-gtk -- Carlos Garcia Campos http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
signature.asc
Description: This is a digitally signed message part
_______________________________________________ webkit-gtk mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-gtk
