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 post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JButton (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