display message on details page

This commit is contained in:
Athou
2013-08-13 12:15:30 +02:00
parent 06a996cd81
commit 21b0176a49
5 changed files with 19 additions and 6 deletions

View File

@@ -42,7 +42,7 @@ import org.apache.http.params.HttpProtocolParams;
import org.apache.http.util.EntityUtils;
/**
* Smart HTTP getter
* Smart HTTP getter: handles gzip, ssl, last modified and etag headers
*
*/
@Slf4j
@@ -110,14 +110,14 @@ public class HttpGetter {
response = client.execute(httpget);
int code = response.getStatusLine().getStatusCode();
if (code == HttpStatus.SC_NOT_MODIFIED) {
throw new NotModifiedException("304 http code");
throw new NotModifiedException("'304 - not modified' http code received");
} else if (code >= 300) {
throw new HttpResponseException(code, "Server returned HTTP error code " + code);
}
} catch (HttpResponseException e) {
if (e.getStatusCode() == HttpStatus.SC_NOT_MODIFIED) {
throw new NotModifiedException("304 http code");
throw new NotModifiedException("'304 - not modified' http code received");
} else {
throw e;
}