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 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> References: Reply-To: Thomas 'PointedEars' Lahn 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 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 . -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not Cc: me. / Bitte keine Kopien per E-Mail.