提交 3dab4c2d 编写于 作者: J Joshua Peek

Skip 308 redirect in PhantomJS

上级 7efe0a50
......@@ -233,11 +233,14 @@ promiseTest('handles 307 redirect response', 2, function() {
})
})
promiseTest('handles 308 redirect response', 2, function() {
return fetch('/redirect/308').then(function(response) {
equal(response.status, 200)
return response.text()
}).then(function(body) {
equal(body, 'hi')
// PhantomJS doesn't support 308 redirects
if (!navigator.userAgent.match(/PhantomJS/)) {
promiseTest('handles 308 redirect response', 2, function() {
return fetch('/redirect/308').then(function(response) {
equal(response.status, 200)
return response.text()
}).then(function(body) {
equal(body, 'hi')
})
})
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册