[webkit-gtk] Finding out the HTTP method of requests
Carlos Garcia Campos
cgarcia at igalia.com
Tue Oct 20 03:26:13 PDT 2015
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
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk
--
Carlos Garcia Campos
http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20151020/7da148ee/attachment.sig>
More information about the webkit-gtk
mailing list