[webkit-help] Only GET, HEAD and POST methods available with XMLHttpRequest

Julien Chaffraix julien.chaffraix at gmail.com
Sat Mar 30 14:15:30 PDT 2013


> I've built webkit from source revision 146912. My web app uses Ext JS to do
> Ajax Rest requests. This means that it needs to use GET, PUT, POST and
> DELETE methods.
>
> When I run my web app in the webkit build it can only send GET and POST
> methods.
>
> By loading this page http://www.mnot.net/javascript/xmlhttprequest/ I get
> the following results...
>
> Testing Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like
> Gecko)
>
> What Methods Are Available?

[Snipped the failing results on your platform, passing on Chrome]

> I'm not sure why this is. Is it fixable?

If you control whole stack, nothing is really unfixable, you will just
need more effort :-)

Also this requires some code in WebKit (more below) so it should be fixable.

> Am I missing a configuration option?

Last time I touched this code (which was several years ago), the
network code needed to be aware of the custom methods. That means that
when you create the low-level library representation of an HTTP
request, you need to take into account
ResourceRequestBase::m_httpMethod. As you didn't tell us which port
you are building (see http://www.webkit.org/asking_questions.html), my
wild guess is that your platform doesn't support that. I don't know of
any configuration option for that as I would expect this to be core to
any network stack if it is implemented (as you didn't tell us much
details, I could be completely wrong though).

Btw, you can also check the support of your port locally as we have 2
tests covering this area:
* LayoutTests/fast/http/tests/xmlhttprequest/methods.html
* LayoutTests/fast/http/tests/xmlhttprequest/methods-async.html

Cheers,
Julien


More information about the webkit-help mailing list