How do I delete a connection request I had sent?

Why is CORS preflighted request missing origin attribute on Chrome and IIS 7.5?

  • First OPTIONS request is contain origin attribute, but second real request is not contain origin attribute. For example: Client request OPTIONS http://localhost:8091/role HTTP/1.1 Host: localhost:8091 Connection: keep-alive Referer: http://test.dev:9000/test.html Access-Control-Request-Method: GET Origin: http://test.dev:9000 Access-Control-Request-Headers: Content-Type, Accept Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4 Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3 Server response HTTP/1.1 200 OK Server: Microsoft-IIS/7.5 Access-Control-Allow-Origin: http://test.dev:9000 Access-Control-Allow-Headers: CONTENT-TYPE, ACCEPT Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS X-Powered-By: http://ASP.NET Date: Sun, 06 Feb 2011 15:12:00 GMT Content-Length: 0 Client request GET http://localhost:8091/role HTTP/1.1 Host: localhost:8091 Connection: keep-alive Referer: http://test.dev:9000/test.html Content-Type: application/json; charset=utf-8 Accept: application/json User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4 Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3 Server response HTTP/1.1 200 OK Cache-Control: private Content-Type: application/json; charset=utf-8 Server: Microsoft-IIS/7.5 X-AspNetMvc-Version: 3.0 X-AspNet-Version: 4.0.30319 X-Powered-By: http://ASP.NET Date: Sun, 06 Feb 2011 15:12:00 GMT Content-Length: 165

  • Answer:

    It happens when the resource is accessed from localhost , which does not provide origin parameter.Even Firefox does it.

Ramesh Chandra at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.