}
Response rep = null;
- if (!login.isSuccess() && WebLibraryUrls.isSupportedUrl(uri)) {
+ if (!login.isSuccess()
+ && WebLibraryUrls.isSupportedUrl(uri, true)) {
rep = loginPage(login, uri);
}
if (rep == null) {
try {
- if (WebLibraryUrls.isSupportedUrl(uri)) {
+ if (WebLibraryUrls.isSupportedUrl(uri, false)) {
if (WebLibraryUrls.INDEX_URL.equals(uri)) {
rep = root(session, cookies, login);
} else if (WebLibraryUrls.VERSION_URL.equals(uri)) {
.replace("{luid}", luid);
}
- static public boolean isSupportedUrl(String url) {
- return INDEX_URL.equals(url) || VERSION_URL.equals(url)
- || LOGOUT_URL.equals(url) || EXIT_URL.equals(url)
- || isViewUrl(url) || isStoryUrl(url) || isListUrl(url)
- || isCoverUrl(url) || isImprtUrl(url) || isDeleteUrl(url);
+ static public boolean isSupportedUrl(String url,
+ boolean requiresLoginOnly) {
+ if (requiresLoginOnly) {
+ return INDEX_URL.equals(url) || LOGOUT_URL.equals(url)
+ || EXIT_URL.equals(url) || isViewUrl(url) || isStoryUrl(url)
+ || isListUrl(url) || isCoverUrl(url) || isImprtUrl(url)
+ || isDeleteUrl(url);
+ }
+
+ return isSupportedUrl(url, true) || VERSION_URL.equals(url);
}
static public String getCoverUrlStory(String luid) {