Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Test against correctly upper-cased method names #467

Merged
merged 1 commit into from

2 participants

@jergason

We upper-case the method name immediately before testing, so the strings we are testing against should be upper-case as well.

@jergason jergason Test against correctly upper-cased method names
We upper-case the method name immediately before testing, so the strings we are testing against should be upper-case as well.
fe4d73c
@assaf assaf merged commit 9edfadb into assaf:master

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 8, 2013
  1. @jergason

    Test against correctly upper-cased method names

    jergason authored
    We upper-case the method name immediately before testing, so the strings we are testing against should be upper-case as well.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/zombie/xhr.coffee
View
2  lib/zombie/xhr.coffee
@@ -69,7 +69,7 @@ class XMLHttpRequest
# Check supported HTTP method
method = method.toUpperCase()
- if /^(connect|trace|track)$/.test(method)
+ if /^(CONNECT|TRACE|TRACK)$/.test(method)
throw new HTML.DOMException(HTML.SECURITY_ERR, "Unsupported HTTP method")
unless /^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/.test(method)
throw new HTML.DOMException(HTML.SYNTAX_ERR, "Unsupported HTTP method")
Something went wrong with that request. Please try again.