List of usage examples for org.apache.commons.httpclient HttpMethodDirector PARAM_REMOVE_USER_DEFINED_AUTH_HEADERS
String PARAM_REMOVE_USER_DEFINED_AUTH_HEADERS
To view the source code for org.apache.commons.httpclient HttpMethodDirector PARAM_REMOVE_USER_DEFINED_AUTH_HEADERS.
Click Source Link
From source file:org.parosproxy.paros.network.HttpSender.java
/** * Sets whether or not the authentication headers ("Authorization" and "Proxy-Authorization") already present in the request * should be removed if received an authentication challenge (status codes 401 and 407). * <p>/*from ww w.ja v a 2s.co m*/ * If {@code true} new authentication headers will be generated and the old ones removed otherwise the authentication * headers already present in the request will be used to authenticate. * <p> * Default is {@code false}, i.e. use the headers already present in the request header. * <p> * Processes that reuse messages previously sent should consider setting this to {@code true}, otherwise new authentication * challenges might fail. * * @param removeHeaders {@code true} if the the authentication headers already present should be removed when challenged, * {@code false} otherwise */ public void setRemoveUserDefinedAuthHeaders(boolean removeHeaders) { client.getParams().setBooleanParameter(HttpMethodDirector.PARAM_REMOVE_USER_DEFINED_AUTH_HEADERS, removeHeaders); clientViaProxy.getParams().setBooleanParameter(HttpMethodDirector.PARAM_REMOVE_USER_DEFINED_AUTH_HEADERS, removeHeaders); }