<div dir="ltr">I have zero experience hacking webkit so I don&#39;t really know what I&#39;m doing, but this works for me. Patch is aginst webkitgtk 2.10.3.<br><br><div class="gmail_extra"><br><div class="gmail_quote">2015-10-20 12:26 GMT+02:00 Carlos Garcia Campos <span dir="ltr">&lt;<a href="mailto:cgarcia@igalia.com" target="_blank">cgarcia@igalia.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El mar, 20-10-2015 a las 10:44 +0200, Jon Forsberg escribió:<br>
&gt; Hello!<br>
&gt; I&#39;m using webkit2gtk to create a restricted web browser and I would<br>
&gt; like to be able to choose which HTTP methods to allow (for both page<br>
&gt; navigation and resource loading). For example I might want to allow<br>
&gt; GET and HEAD but not POST as a way to limit interaction with web<br>
&gt; pages. I have looked at the resource-load-started and decide-<br>
&gt; policy signals and the WebKitWebResource, WebKitURIRequest and<br>
&gt; WebKitURIResponse classes but it seems the closest you can get is a<br>
&gt; SoupMessageHeaders (which contains the headers but not the method).<br>
&gt; Am i missing something or is it not possible to find out the method<br>
&gt; of a request?<br>
<br>
No, you aren&#39;t. It&#39;s not exposed, but it should be easy to add<br>
a webkit_uri_request_get_http_method() or something similar. Note that<br>
to block requests, you need to use a web process extension and connect<br>
to WebKitWebPage::send-request signal.<br>
Feel free to file a bug report to request this, if you can provide a<br>
patch it would be even better :-)<br>
<br>
&gt; Thanks<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; webkit-gtk mailing list<br>
&gt; <a href="mailto:webkit-gtk@lists.webkit.org">webkit-gtk@lists.webkit.org</a><br>
&gt; <a href="https://lists.webkit.org/mailman/listinfo/webkit-gtk" rel="noreferrer" target="_blank">https://lists.webkit.org/mailman/listinfo/webkit-gtk</a><br>
<span class="HOEnZb"><font color="#888888">--<br>
Carlos Garcia Campos<br>
<a href="http://pgp.rediris.es:11371/pks/lookup?op=get&amp;search=0xF3D322D0EC4582C3" rel="noreferrer" target="_blank">http://pgp.rediris.es:11371/pks/lookup?op=get&amp;search=0xF3D322D0EC4582C3</a><br>
<br>
</font></span><br>_______________________________________________<br>
webkit-gtk mailing list<br>
<a href="mailto:webkit-gtk@lists.webkit.org">webkit-gtk@lists.webkit.org</a><br>
<a href="https://lists.webkit.org/mailman/listinfo/webkit-gtk" rel="noreferrer" target="_blank">https://lists.webkit.org/mailman/listinfo/webkit-gtk</a><br>
<br></blockquote></div><br></div></div>