Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$http: unusable params passed to error handler when CORS preflight fails  #3336

@DinoChiesa

Description

@DinoChiesa

Suppose an http POST to a different origin. This implies CORS, including a CORS preflight exchange. Now suppose the OPTIONS request returns a 500 error due to a server problem. In this case the error handler gives "" for data and 0 for status.

Seems wrong.

$http.post(myUrl, loginPayload, loginHttpConfig)
  .success(function (response) {
     ....
  })
  .error(function(data, status, headers, config) {
    // In the event of a 500 response from the implicit OPTIONS
    // request for CORS preflight, data ="", and status=0. This 
    // seems wrong.  
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions