<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.25</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
FileOutputStream output = null;
String fullUrl = serverUrl + path;
try {
- if (Logs.isDebugEnabled()) {
- Logs.debug("Download " + fullUrl + " to " + toFile.getAbsolutePath());
- }
+ Logs.debug("Download " + fullUrl + " to " + toFile.getAbsolutePath());
HttpURLConnection connection = newHttpConnection(new URL(fullUrl));
int statusCode = connection.getResponseCode();
if (statusCode != HttpURLConnection.HTTP_OK) {
if (contentType == null) {
return null;
}
-
Matcher m = CHARSET_PATTERN.matcher(contentType);
if (m.find()) {
return m.group(1).trim().toUpperCase();