public static synchronized void debugHeaders(boolean print) { HTTPUtil.InterceptRequest rq = new HTTPUtil.InterceptRequest(); HTTPUtil.InterceptResponse rs = new HTTPUtil.InterceptResponse(); rq.setPrint(print); rs.setPrint(print); /* remove any previous */ for (int i = reqintercepts.size() - 1; i >= 0; i--) { HttpRequestInterceptor hr = reqintercepts.get(i); if (hr instanceof HTTPUtil.InterceptCommon) reqintercepts.remove(i); } for (int i = rspintercepts.size() - 1; i >= 0; i--) { HttpResponseInterceptor hr = rspintercepts.get(i); if (hr instanceof HTTPUtil.InterceptCommon) rspintercepts.remove(i); } reqintercepts.add(rq); rspintercepts.add(rs); }
public static void removeGlobalCompression() { if (globalsettings.removeParameter(Prop.COMPRESSION) != null) { for (int i = rspintercepts.size() - 1; i >= 0; i--) { // walk backwards HttpResponseInterceptor hrsi = rspintercepts.get(i); if (hrsi instanceof GZIPResponseInterceptor || hrsi instanceof DeflateResponseInterceptor) rspintercepts.remove(i); } } }
synchronized HTTPSession removeMethod(HTTPMethod m) { methodList.remove(m); return this; }