close
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public String getRedirectLocation() {

/**
* Determine whether this result is a redirect.
* Returns true for: 301,302,303 and 307(GET or HEAD)
* Returns true for: 301,302,303,307 and 308 (GET or HEAD)
* @return true iff res is an HTTP redirect response
*/
public boolean isRedirect() {
Expand All @@ -115,7 +115,8 @@ public boolean isRedirect() {
*/
final String[] redirectCodes = { HTTPConstants.SC_MOVED_PERMANENTLY,
HTTPConstants.SC_MOVED_TEMPORARILY,
HTTPConstants.SC_SEE_OTHER };
HTTPConstants.SC_SEE_OTHER,
HTTPConstants.SC_PERMANENT_REDIRECT };
String code = getResponseCode();
for (String redirectCode : redirectCodes) {
if (redirectCode.equals(code)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public interface HTTPConstantsInterface { // CHECKSTYLE IGNORE InterfaceIsType
String SC_MOVED_TEMPORARILY = "302";
String SC_SEE_OTHER = "303";
String SC_TEMPORARY_REDIRECT = "307";
String SC_PERMANENT_REDIRECT = "308";

int DEFAULT_HTTPS_PORT = 443;
String DEFAULT_HTTPS_PORT_STRING = "443"; // $NON-NLS-1$
Expand Down