browserify / http-browserify

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

Set the xhr.withCredentials flag after xhr.open() #70

Closed bjoerge closed 2 years ago

bjoerge commented 9 years ago

Setting xhr.withCredentials = true before the xhr.open() call throws an InvalidStateError in IE10 (and possibly other browsers too). This behaviour is actually according to spec: http://www.w3.org/TR/XMLHttpRequest2/#the-withcredentials-attribute.

I can't see any reason for the try catch around it either (other than making it harder to spot errors), so I removed it too. I'm happy to bring it back if there are good reasons for it.

atombender commented 9 years ago

+1

atombender commented 9 years ago

Can we get this merged? Won't work on IE10 otherwise.