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()) {
|
||||
switch (matcher.group(1).toLowerCase()) {
|
||||
case "max-age":
|
||||
cc.setMaxAge(Integer.parseInt(matcher.group(3))); break;
|
||||
cc.setMaxAge(Integer.parseInt(matcher.group(3)));
|
||||
break;
|
||||
case "must-revalidate":
|
||||
cc.setMustRevalidate(true); break;
|
||||
cc.setMustRevalidate(true);
|
||||
break;
|
||||
case "no-cache":
|
||||
cc.setNoCache(true); break;
|
||||
cc.setNoCache(true);
|
||||
break;
|
||||
case "no-store":
|
||||
cc.setNoStore(true); break;
|
||||
cc.setNoStore(true);
|
||||
break;
|
||||
default: //ignore
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,8 @@ public class HttpConnectionManager {
|
||||
|
||||
public HttpURLConnection makeConnection()
|
||||
throws IOException, NoSuchMethodException, ScriptException, URISyntaxException {
|
||||
return makeConnection(this.requestURL, 0, (c) -> {});
|
||||
return makeConnection(this.requestURL, 0, (c) -> {
|
||||
});
|
||||
}
|
||||
|
||||
private HttpURLConnection makeConnection(URL requestURL, int movedTimes,
|
||||
@ -102,7 +103,7 @@ public class HttpConnectionManager {
|
||||
beforeConnection.accept(connection);
|
||||
|
||||
// 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();
|
||||
int resp = connection.getResponseCode();
|
||||
|
Loading…
x
Reference in New Issue
Block a user