Chrome performs pre-flight automatically.
HTTP OPTIONS
Request Headers:
Access-Control-Request-Headers: content-type, x-si-eventbody
Access-Control-Request-Method: POST
...
Response Headers:
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: X-SI-EventBody (customer header)
Access-Control-Allow-Methods: POST
Access-Control-Allow-Origin: (origin of caller)
...
Status Code: should be 200 OK
HTTP POST
Request Headers:
Content-Type: application/x-www-form-urlencoded,charset=UTF-8
Body: form-urlencoded name/value pairs
ResponseHeaders:
Status Code: should be 200 OK.
When the OPTIONS request is canceled, chrome does not try to send the POST. Other times the OPTIONS passes with 200 OK and the POST request is canceled.
The network tab reports such cancellations as follows:
Name Method Status Type Initiator Size Time
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
OPTIONS or POST (canceled) xhr 0 - OPTIONS, ~2k - POST always < 500ms
Programmatically, the AJAX call did NOT timeout. It is not obvious to why chrome is cancelling this request. I also enabled net-internals but did not see anything noteworthy. What is the best way to dig deeper to find why chrome is canceling certain requests.
Thanks
--
You received this message because you are subscribed to the Google Groups "net-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to net-dev+u...@chromium.org.
To post to this group, send email to net...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/net-dev/dbcde524-5c09-4346-8d04-d04b2818759d%40chromium.org.
Hi Tony,
Not sure if you found a solution yet, but I recently got into the same problem and just found an answer. This could be possibly due to Cross-Origin requests.
Refer to the below links: Hope it helps :)
http://twincreations.co.uk/ajax-request-canceled-status-with-no-http-header/
https://en.wikipedia.org/wiki/Same-origin_policy
Best,
Vijay
I am facing chrome request cancel in case of CDN request. After doing manual purge from azure portal there is no error come. I am not sure how chrome behavior related to CDN purge?
If we consider it as CORS issue then when we purge from CDN how it started working?
Any response????
Regards
Mahaveer