Index: third_party/WebKit/Source/modules/fetch/Response.cpp |
diff --git a/third_party/WebKit/Source/modules/fetch/Response.cpp b/third_party/WebKit/Source/modules/fetch/Response.cpp |
index 7a8ad09b960a7d4df3c3138cad3971c452cefd1d..50d5c8629a0651016371a11d15f16387116cf707 100644 |
--- a/third_party/WebKit/Source/modules/fetch/Response.cpp |
+++ b/third_party/WebKit/Source/modules/fetch/Response.cpp |
@@ -26,6 +26,7 @@ |
#include "modules/fetch/ResponseInit.h" |
#include "platform/network/EncodedFormData.h" |
#include "platform/network/HTTPHeaderMap.h" |
+#include "platform/network/NetworkUtils.h" |
#include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h" |
#include "wtf/RefPtr.h" |
#include <memory> |
@@ -312,8 +313,7 @@ Response* Response::redirect(ExecutionContext* context, |
return nullptr; |
} |
- if (status != 301 && status != 302 && status != 303 && status != 307 && |
- status != 308) { |
+ if (!NetworkUtils::isRedirectResponseCode(status)) { |
exceptionState.throwRangeError("Invalid status code"); |
return nullptr; |
} |