mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-31 20: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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user