Bug fixes (im frustrated)
This commit is contained in:
@@ -43,7 +43,7 @@ public final class HttpsProxy {
|
||||
return new WebResponsePacket(
|
||||
502,
|
||||
"text/plain; charset=utf-8",
|
||||
Map.of(),
|
||||
HeaderMaps.mutable(),
|
||||
("Bad Gateway: " + e.getClass().getName() + ": " + e.getMessage()).getBytes(StandardCharsets.UTF_8)
|
||||
);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public final class HttpsProxy {
|
||||
return new WebResponsePacket(
|
||||
508,
|
||||
"text/plain; charset=utf-8",
|
||||
Map.of(),
|
||||
HeaderMaps.mutable(),
|
||||
"Too many redirects".getBytes(StandardCharsets.UTF_8)
|
||||
);
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public final class HttpsProxy {
|
||||
return new WebResponsePacket(
|
||||
502,
|
||||
"text/plain; charset=utf-8",
|
||||
Map.of(),
|
||||
HeaderMaps.mutable(),
|
||||
("Bad Gateway: redirect without Location (code=" + code + ")").getBytes(StandardCharsets.UTF_8)
|
||||
);
|
||||
}
|
||||
@@ -104,8 +104,7 @@ public final class HttpsProxy {
|
||||
con.disconnect();
|
||||
}
|
||||
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
return new WebResponsePacket(code, contentType, headers, body);
|
||||
return new WebResponsePacket(code, contentType, HeaderMaps.mutable(), body);
|
||||
}
|
||||
|
||||
private static byte[] readAllBytes(InputStream in) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user