Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error code 12019 / 12007 ajax request on IE8

If I disconnect my wifi before sending an ajax request on the IE 10 and FF, the request is aborted. The HTTP status code is 0 and response body is empty.

On IE 8, the response code is 12007 or 12019 and response body is also empty.

I have to have some error handling for aborted requests.

Can I be sure that response code 12007 / 12019 corresponds to aborted request in IE8? Or can it be sent back for other errors?

I see from MS doc that this error means:

   12019       ERROR_INTERNET_INCORRECT_HANDLE_STATE
               The requested operation cannot be carried out because the
               handle supplied is not in the correct state.

   12007       ERROR_INTERNET_NAME_NOT_RESOLVED
               The server name could not be resolved.

I just want to be sure that I am correct in thinking that this error is only likely happen when there is n/w failure of some sort.

like image 650
More Than Five Avatar asked Nov 13 '22 06:11

More Than Five


1 Answers

I got the same issue on IE8 when doing a POST using XmlHttpRequest on a HTTPS URL.

I suspected a SSL certificate issue, thus I entered another URL from the same server in the location address bar, IE notified me about an untrusted certificate. I accepted to browse the URL. Then the POST XHR worked as expected (no HTTP status 12019).

I suppose this is because I another web application on the same server but on a different port and with a different SSL certificate.

like image 123
Julien Kronegg Avatar answered Dec 12 '22 09:12

Julien Kronegg