Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #25677

Re: XHR and 12031

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: XHR and 12031
Date Mon, 11 Aug 2014 19:43:39 +0200
Organization PointedEars Software (PES)
Lines 57
Message-ID <1742628.ATlSF9rIuR@PointedEars.de> (permalink)
References <wICdnXK4x8qwvHXOnZ2dnUVZ_u6dnZ2d@westnet.com.au>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1407779026 14793 eJwNyMkBwDAIA7CVQrE5xoFQ9h+h1VNUE7sOo4HLVW6o1ikZ2f+SqOMhyCnE43iZeXs62lSOfQZgEEc= (11 Aug 2014 17:43:46 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Mon, 11 Aug 2014 17:43:46 +0000 (UTC)
User-Agent KNode/4.12.4
X-User-ID eJwFwYEBwCAIA7CXRGjBcxTW/09YAqexMwgGBJnb8AgfeUvuuZvVGiAz32aNbG18Mcn1nqznsHHPZayq+gFF3hUi
Cancel-Lock sha1:ZxJKLyjTs52UkyRT/K8ULKINnMM=
X-NNTP-Posting-Host eJwNyMEBwCAIA8CVpJCg4wiN+4+gn3scnMbOIBg4OFUKb9mC/99MjtQkcryg6rmDJi2PQhf2BRDiEK0=
Xref csiph.com comp.lang.javascript:25677

Show key headers only | View raw


Andrew Poulos wrote:

> If I make an XHR call to
>    [server]/projects/test
> IIS returns "HTTP/1.1 405 Method Not Allowed" even though I've edited
> the handler mappings to allow "all" verbs to file or folder.

This implies that you are not making either a GET or a POST request.
 
> All the files are on the same server.

Irrelevant.  The *URI* scheme, host name, and server-side port number of the 
resource to be accessed matter.
 
> If set IIS to do a URL rewrite to temporarily add a trail slash so that
>    [server]/projects/test
> becomes
>    [server]/projects/test/
> then every browser I test will allow the XHR call to complete (return a
> status of 200). Except for IE.

Server-side URL rewrite is AFAIK not visible to the client.  If the URI 
basically works, the former cannot be the reason for XHR failure.  However, 
that you are using a different URI then may be, because of client-side 
caching.
 
> When I check the developer panel in IE 9 the network pane shows the
                   ^^^^^^^^^^^^^^^^^^^^^^^
> request as pending until it finally returns 12031.
                                              ^^^^^ 
> When I check the developer panel in IE 10 the debug pane shows "access
                   ^^^^^^^^^^^^^^^^^^^^^^^^
> is denied" when it tries to XHR open
>    xhr.open(cfg.method, url, async);
     ^^^      ^^^^^^^^^^^ ^^^  ^^^^^
> If I put the full URL in
>    xhr.open(cfg.method, "[server]/projects/test/default.asp", async);
     ^^^      ^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^
> then IE allows the XHR call to complete (return a status of 200).
> 
> How do I get IE to behave without needing a full URL?

I do not think, especially now that you have discovered that the behavior is 
not limited to IE 10, that it matters whether you provide a URI or a URI-
reference (there is no “full URL”, see RFC 3986).

You need to provide the *full* context.  A public testcase would be best, 
but a more detailed description and screenshots might suffice.

See the FAQ Notes and
<http://www.catb.org/~esr/faqs/smart-questions.html#beprecise>.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

XHR and 12031 Andrew Poulos <ap_prog@hotmail.com> - 2014-08-11 11:46 +1000
  Re: XHR and 12031 Andrew Poulos <ap_prog@hotmail.com> - 2014-08-11 14:32 +1000
  Re: XHR and 12031 Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-08-11 19:43 +0200
    Re: XHR and 12031 Andrew Poulos <ap_prog@hotmail.com> - 2014-08-12 08:36 +1000
      Re: XHR and 12031 Andrew Poulos <ap_prog@hotmail.com> - 2014-08-12 12:53 +1000

csiph-web