browserify / http-browserify

node's http module, but for the browser
MIT License
244 stars 110 forks source link

Webkit/Chrome requires xhr to be open before setting headers #2

Closed erithmetic closed 12 years ago

erithmetic commented 13 years ago

At least this seemed be the case in my browser

jxson commented 13 years ago

I am having the same issue in Safari Webkit (Version 5.1.1 (7534.51.22) )

erithmetic commented 13 years ago

Also note from MDN: https://developer.mozilla.org/en/XMLHttpRequest#setRequestHeader()

Sets a HTTP request header for HTTP requests. You must call open before setting the request headers.
zahanm commented 12 years ago

+1 on getting this merged in @substack , it's absolutely necessary for CORS stuff in modern browsers.

zahanm commented 12 years ago

:) thanks.

jxson commented 12 years ago

yes, thank you!