Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: IIS http.open "GET" error Date: Fri, 9 Oct 2020 23:52:43 +0200 Lines: 18 Message-ID: References: <57187615-9378-4077-aa19-111a16aee75ao@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net +x3IDgZNUkXEeSqz/s7hrQ7ng5pkaYw57i4iQhkXDEHr27cDMC Cancel-Lock: sha1:YjjOkukqSiUD6oER4br+xjX4DNo= In-Reply-To: <57187615-9378-4077-aa19-111a16aee75ao@googlegroups.com> Xref: csiph.com comp.lang.javascript:38924 Jonas Thörnvall: > Den fredag 9 oktober 2020 kl. 12:03:37 UTC+2 skrev Arno Welzel: [...] >> 3) Add error handling - there are many reasons why a request can fail. >> Assuming a function which fetches data via XHR will always work and >> always return data in a certain way will eventually cause security >> problems. If loadFile() can return null then handle this case and don't >> assume in parse() that there will always be a valid content. > Well the fetch is working as soon you rename it to SPASSKY.TXT Then either configure IIS properly or use Apache or NGINX instead. Neither Apache or NGINX will return HTTP 404 for an "unknown" extension. -- Arno Welzel https://arnowelzel.de