Example #1
0
  /**
   * Get the request header value for the named property.
   *
   * @param key property name of specific HTTP 1.1 header field
   * @return value of the named property, if found, null otherwise.
   */
  public String getRequestProperty(String key) {
    /* https handles the proxy fields in a different way */
    if (key.startsWith("Proxy-")) {
      return proxyHeaders.getProperty(key);
    }

    return super.getRequestProperty(key);
  }
Example #2
0
  /**
   * Add the named field to the list of request fields.
   *
   * @param key key for the request header field.
   * @param value the value for the request header field.
   */
  protected void setRequestField(String key, String value) {
    /* https handles the proxy fields in a different way */
    if (key.startsWith("Proxy-")) {
      proxyHeaders.setProperty(key, value);
      return;
    }

    super.setRequestField(key, value);
  }