+ } else if (reply.startsWith("3") && allowRedirects) {
+ String location = (String)h.get("location");
+ if (location == null) throw new HTTPException("Got HTTP " + reply.substring(0, 3) + " but no Location header");
+ Log.info(HTTP.class, "redirecting to " + location);
+ if (content != null)
+ return new HTTP(location).POST(contentType, content, url, cookies);
+ else
+ return new HTTP(location).GET(url, cookies);
+