mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-20 09:52:13 +01:00
Code reformat
This commit is contained in:
parent
1bc994ec86
commit
f2a4ea5e15
@ -27,13 +27,17 @@ public class CacheControl {
|
|||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
switch (matcher.group(1).toLowerCase()) {
|
switch (matcher.group(1).toLowerCase()) {
|
||||||
case "max-age":
|
case "max-age":
|
||||||
cc.setMaxAge(Integer.parseInt(matcher.group(3))); break;
|
cc.setMaxAge(Integer.parseInt(matcher.group(3)));
|
||||||
|
break;
|
||||||
case "must-revalidate":
|
case "must-revalidate":
|
||||||
cc.setMustRevalidate(true); break;
|
cc.setMustRevalidate(true);
|
||||||
|
break;
|
||||||
case "no-cache":
|
case "no-cache":
|
||||||
cc.setNoCache(true); break;
|
cc.setNoCache(true);
|
||||||
|
break;
|
||||||
case "no-store":
|
case "no-store":
|
||||||
cc.setNoStore(true); break;
|
cc.setNoStore(true);
|
||||||
|
break;
|
||||||
default: //ignore
|
default: //ignore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,8 @@ public class HttpConnectionManager {
|
|||||||
|
|
||||||
public HttpURLConnection makeConnection()
|
public HttpURLConnection makeConnection()
|
||||||
throws IOException, NoSuchMethodException, ScriptException, URISyntaxException {
|
throws IOException, NoSuchMethodException, ScriptException, URISyntaxException {
|
||||||
return makeConnection(this.requestURL, 0, (c) -> {});
|
return makeConnection(this.requestURL, 0, (c) -> {
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private HttpURLConnection makeConnection(URL requestURL, int movedTimes,
|
private HttpURLConnection makeConnection(URL requestURL, int movedTimes,
|
||||||
@ -102,7 +103,7 @@ public class HttpConnectionManager {
|
|||||||
beforeConnection.accept(connection);
|
beforeConnection.accept(connection);
|
||||||
|
|
||||||
// Connect
|
// Connect
|
||||||
log.info("Connect to {}, method={}, request id={}", requestURL, connection.getRequestMethod(),requestId);
|
log.info("Connect to {}, method={}, request id={}", requestURL, connection.getRequestMethod(), requestId);
|
||||||
|
|
||||||
connection.connect();
|
connection.connect();
|
||||||
int resp = connection.getResponseCode();
|
int resp = connection.getResponseCode();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user