Skip to content

Commit

Permalink
CORS: Don't check response code on OPENED status
Browse files Browse the repository at this point in the history
  • Loading branch information
odinho committed Aug 30, 2013
1 parent c03f38d commit e44df07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cors/status-async.htm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h1>Status returned</h1>
client.setRequestHeader('x-nonsimple', true)

client.onreadystatechange = this.step_func(function() {
if (client.readyState < client.HEADERS_RECIEVED)
if (client.readyState < client.HEADERS_RECEIVED)
return
assert_equals(client.response, "", "response data")
assert_equals(client.status, expect_code, "response status")
Expand Down
2 changes: 2 additions & 0 deletions cors/status-preflight.htm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ <h1>Status after preflight</h1>

client.setRequestHeader('x-nonsimple', true)
client.onreadystatechange = this.step_func(function() {
if (client.readyState < client.HEADERS_RECEIVED)
return
assert_equals(client.response, "", "response data")
assert_equals(client.status, code, "response status")
if (client.readyState == client.DONE)
Expand Down

0 comments on commit e44df07

Please sign in to comment.