Fix proxy bug in dev server

This commit is contained in:
Alexey Andreev 2019-01-27 23:00:20 +03:00
parent 78c55437e3
commit e404e2d37f

View File

@ -257,7 +257,7 @@ public class CodeServlet extends HttpServlet {
try { try {
URL url = new URL(proxyUrl); URL url = new URL(proxyUrl);
proxyPort = url.getPort(); proxyPort = url.getPort();
proxyHost = proxyPort != 80 ? url.getHost() + ":" + proxyPort : url.getHost(); proxyHost = proxyPort >= 0 ? url.getHost() + ":" + proxyPort : url.getHost();
proxyProtocol = url.getProtocol(); proxyProtocol = url.getProtocol();
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();