X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnet%2FHTTP.java;fp=src%2Forg%2Fibex%2Fnet%2FHTTP.java;h=c95183ca876c7f9a2a1b66b48736ae8da67b323e;hb=b916b5274a3b292647805ed19a78a930a0370826;hp=30de701db0840f229dcce8f4012272206f84709e;hpb=3b6ea42a7cb180d9b16fdaf19c2068aaf88e0585;p=org.ibex.net.git diff --git a/src/org/ibex/net/HTTP.java b/src/org/ibex/net/HTTP.java index 30de701..c95183c 100644 --- a/src/org/ibex/net/HTTP.java +++ b/src/org/ibex/net/HTTP.java @@ -16,7 +16,9 @@ public class HTTP { public static InetAddress originAddr = null; public static String originHost = null; - + // FIXME: HACK + public static String userAgent = "Ibex"; + // Cookies ////////////////////////////////////////////////////////////////////////////// public static class Cookie { @@ -455,8 +457,9 @@ public class HTTP { } else { pw.print("GET " + path + " HTTP/1.1\r\n"); } - - pw.print("User-Agent: Ibex\r\n"); + + if (cookies != null) pw.print(cookies.getCookieHeader(host, path, ssl)); + pw.print("User-Agent: " + userAgent + "\r\n"); pw.print("Accept-encoding: gzip\r\n"); pw.print("Host: " + (host + (port == 80 ? "" : (":" + port))) + "\r\n"); if (proxied) pw.print("X-RequestOrigin: " + originHost + "\r\n");