src/com/mlhsoftware/commandline/network/CookieManager.java
private boolean isCookieName( String cookieSegment )
  {
    //check for invalid format 
    if ( cookieSegment.equals( "" ) )
    {
      return false;
    }

    if ( cookieSegment.indexOf( "=" ) < 0 )
    {
      return false;
    }

    //check for supported cookie property keyword
    if ( cookieSegment.toLowerCase().startsWith( "domain" ) )
    {
      return false;
    }

    if ( cookieSegment.toLowerCase().startsWith( EXPIRES ) )
    {
      return false;
    }

    if ( cookieSegment.toLowerCase().startsWith( "comment" ) )
    {
      return false;
    }

    if ( cookieSegment.toLowerCase().startsWith( "max-age" ) )
    {
      return false;
    }

    if ( cookieSegment.toLowerCase().startsWith( "path" ) )
    {
      return false;
    }

    if ( cookieSegment.toLowerCase().startsWith( "secure" ) )
    {
      return false;
    }

    if ( cookieSegment.toLowerCase().startsWith( "version" ) )
    {
      return false;
    }

    //the cookieSegment is the [name=value] piece of the set-cookie header
    return true;
  }
//Idenfities whether a segment of a cookie string is the name=value pair
Idenfities whether a segment of a cookie string is the name=value pair
Idenfities whether a segment of a cookie string is the name = value pair
private boolean isCookieName( String cookieSegment )
  {
    if ( cookieSegment.equals( "" ) )
    {
      return false;
    }
    if ( cookieSegment.indexOf( "=" ) < 0 )
    {
      return false;
    }
    if ( cookieSegment.toLowerCase().startsWith( "domain" ) )
    {
      return false;
    }
    if ( cookieSegment.toLowerCase().startsWith( EXPIRES ) )
    {
      return false;
    }
    if ( cookieSegment.toLowerCase().startsWith( "comment" ) )
    {
      return false;
    }
    if ( cookieSegment.toLowerCase().startsWith( "max-age" ) )
    {
      return false;
    }
    if ( cookieSegment.toLowerCase().startsWith( "path" ) )
    {
      return false;
    }
    if ( cookieSegment.toLowerCase().startsWith( "secure" ) )
    {
      return false;
    }
    if ( cookieSegment.toLowerCase().startsWith( "version" ) )
    {
      return false;
    }
    return true;
  }
private boolean isCookieName ( String cookieSegment ) { if ( cookieSegment . equals ( "" ) ) { return false ; } if ( cookieSegment . indexOf ( "=" ) < 0 ) { return false ; } if ( cookieSegment . toLowerCase ( ) . startsWith ( "domain" ) ) { return false ; } if ( cookieSegment . toLowerCase ( ) . startsWith ( EXPIRES ) ) { return false ; } if ( cookieSegment . toLowerCase ( ) . startsWith ( "comment" ) ) { return false ; } if ( cookieSegment . toLowerCase ( ) . startsWith ( "max-age" ) ) { return false ; } if ( cookieSegment . toLowerCase ( ) . startsWith ( "path" ) ) { return false ; } if ( cookieSegment . toLowerCase ( ) . startsWith ( "secure" ) ) { return false ; } if ( cookieSegment . toLowerCase ( ) . startsWith ( "version" ) ) { return false ; } return true ; }
Idenfities whether a segment of a cookie string is the name=value pair
Idenfities whether a segment of a cookie string is the name = value pair
//check for invalid format  //check for supported cookie property keyword //the cookieSegment is the [name=value] piece of the set-cookie header