Tabnine Logo
Cookie2.setPortAttributeBlank
Code IndexAdd Tabnine to your IDE (free)

How to use
setPortAttributeBlank
method
in
org.apache.commons.httpclient.cookie.Cookie2

Best Java code snippets using org.apache.commons.httpclient.cookie.Cookie2.setPortAttributeBlank (Showing top 5 results out of 315)

origin: commons-httpclient/commons-httpclient

/**
 * Parse cookie port attribute.
 */
public void parse(final Cookie cookie, final String portValue)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if ((portValue == null) || (portValue.trim().equals(""))) {
      // If the Port attribute is present but has no value, the
      // cookie can only be sent to the request-port.
      // Since the default port list contains only request-port, we don't
      // need to do anything here.
      cookie2.setPortAttributeBlank(true);
    } else {
      int[] ports = parsePortAttribute(portValue);
      cookie2.setPorts(ports);
    }
    cookie2.setPortAttributeSpecified(true);
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Parse cookie port attribute.
 */
public void parse(final Cookie cookie, final String portValue)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if ((portValue == null) || (portValue.trim().equals(""))) {
      // If the Port attribute is present but has no value, the
      // cookie can only be sent to the request-port.
      // Since the default port list contains only request-port, we don't
      // need to do anything here.
      cookie2.setPortAttributeBlank(true);
    } else {
      int[] ports = parsePortAttribute(portValue);
      cookie2.setPorts(ports);
    }
    cookie2.setPortAttributeSpecified(true);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Parse cookie port attribute.
 */
public void parse(final Cookie cookie, final String portValue)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if ((portValue == null) || (portValue.trim().equals(""))) {
      // If the Port attribute is present but has no value, the
      // cookie can only be sent to the request-port.
      // Since the default port list contains only request-port, we don't
      // need to do anything here.
      cookie2.setPortAttributeBlank(true);
    } else {
      int[] ports = parsePortAttribute(portValue);
      cookie2.setPorts(ports);
    }
    cookie2.setPortAttributeSpecified(true);
  }
}
origin: org.apache.commons/httpclient

/**
 * Parse cookie port attribute.
 */
public void parse(final Cookie cookie, final String portValue)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if ((portValue == null) || (portValue.trim().equals(""))) {
      // If the Port attribute is present but has no value, the
      // cookie can only be sent to the request-port.
      // Since the default port list contains only request-port, we don't
      // need to do anything here.
      cookie2.setPortAttributeBlank(true);
    } else {
      int[] ports = parsePortAttribute(portValue);
      cookie2.setPorts(ports);
    }
    cookie2.setPortAttributeSpecified(true);
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Parse cookie port attribute.
 */
public void parse(final Cookie cookie, final String portValue)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if ((portValue == null) || (portValue.trim().equals(""))) {
      // If the Port attribute is present but has no value, the
      // cookie can only be sent to the request-port.
      // Since the default port list contains only request-port, we don't
      // need to do anything here.
      cookie2.setPortAttributeBlank(true);
    } else {
      int[] ports = parsePortAttribute(portValue);
      cookie2.setPorts(ports);
    }
    cookie2.setPortAttributeSpecified(true);
  }
}
org.apache.commons.httpclient.cookieCookie2setPortAttributeBlank

Javadoc

Indicates whether the Port attribute in Set-Cookie2 header contains no value (is of the form Port="").

This value is required for generating the Cookie request header because the specification requires that if Set-Cookie2 header contains a blank value for port attribute, the Cookie header should also contain a port attribute with no value.

Popular methods of Cookie2

  • <init>
    Creates a cookie with the given name, value, domain attribute, path attribute, expiration attribute,
  • getDomain
  • getExpiryDate
  • getName
  • getPath
  • getPorts
    Get the Port attribute. It restricts the ports to which a cookie may be returned in a Cookie request
  • getValue
  • getVersion
  • isDomainAttributeSpecified
  • isPathAttributeSpecified
  • isPortAttributeBlank
  • isPortAttributeSpecified
  • isPortAttributeBlank,
  • isPortAttributeSpecified,
  • isVersionAttributeSpecified,
  • setCommentURL,
  • setDiscard,
  • setPortAttributeSpecified,
  • setPorts,
  • setVersion,
  • setVersionAttributeSpecified

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • BoxLayout (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now