Problem with XmlHttpRequest (status 0)

966 views
Skip to first unread message

Tomas

unread,
Jul 1, 2010, 4:48:24 AM7/1/10
to Chromium-extensions
Hi,
in my extension I send a XmlHttpRequest from a background page.
Wouldn't work, I found out that I need to set the permission in my
manifest.json liek this:
"permissions": [
"http://192.168.33.15:9994/*", //server for my xmlhttprequest
"tabs"
],

Ok, so far so good.

However when I receveive a response my xmlhttp.readyState == 4 and
xmlhttp.status == 0.
Obviously I expect the status to be 200. Any advise?

Cheers

Tomas

unread,
Jul 1, 2010, 4:54:01 AM7/1/10
to Chromium-extensions
Observation:
The problem is apparently related to those permissions. When changed
to "http://*/*" things start to work. But this makes very little sense
to me as all my requests go to

http://192.168.33.15:9994/whatever

so they should be covered by the previous rule http://192.168.33.15:9994/*
however this is not the case.

am i wrong?

Brian Kennish

unread,
Jul 1, 2010, 5:07:47 AM7/1/10
to Tomas, Chromium-extensions

Ports are not part of the extension match pattern.
"http://192.168.33.15/*" should work instead.

Tomas

unread,
Jul 1, 2010, 5:18:33 AM7/1/10
to Chromium-extensions
Indeed! Your solution helped. Many thanks
Reply all
Reply to author
Forward
0 new messages