common/src/main/java/HTTPClient/CookieModule.java
/**
     * returns whether this cookie should be accepted. First checks the
     * stored lists of accept and reject domains, and if it is neither
     * accepted nor rejected by these then query the user via a popup.
     *
     * @param cookie   the cookie in question
     * @param req      the request
     * @param resp     the response
     * @return true if we accept this cookie.
     */
returns whether this cookie should be accepted. First checks the
stored lists of accept and reject domains, and if it is neither
accepted nor rejected by these then query the user via a popup.

@param cookie   the cookie in question
@param req      the request
@param resp     the response
@return true if we accept this cookie.
returns whether this cookie should be accepted . First checks the stored lists of accept and reject domains and if it is neither accepted nor rejected by these then query the user via a popup . @param cookie the cookie in question @param req the request @param resp the response @return true if we accept this cookie .
public boolean acceptCookie(Cookie cookie, RoRequest req, RoResponse resp)
    {
	String server = req.getConnection().getHost();
	if (server.indexOf('.') == -1)  server += ".local";
	for (int idx=0; idx<reject_domains.length; idx++)
	{
	    if (reject_domains[idx].length() == 0  ||
		reject_domains[idx].charAt(0) == '.'  &&
		server.endsWith(reject_domains[idx])  ||
		reject_domains[idx].charAt(0) != '.'  &&
		server.equals(reject_domains[idx]))
		    return false;
	}
	for (int idx=0; idx<accept_domains.length; idx++)
	{
	    if (accept_domains[idx].length() == 0  ||
		accept_domains[idx].charAt(0) == '.'  &&
		server.endsWith(accept_domains[idx])  ||
		accept_domains[idx].charAt(0) != '.'  &&
		server.equals(accept_domains[idx]))
		    return true;
	}
	return true;
    }
public boolean acceptCookie ( Cookie cookie , RoRequest req , RoResponse resp ) { String server = req . getConnection ( ) . getHost ( ) ; if ( server . indexOf ( '.' ) == - 1 ) server += ".local" ; for ( int idx = 0 ; idx < reject_domains . length ; idx ++ ) { if ( reject_domains [ idx ] . length ( ) == 0 || reject_domains [ idx ] . charAt ( 0 ) == '.' && server . endsWith ( reject_domains [ idx ] ) || reject_domains [ idx ] . charAt ( 0 ) != '.' && server . equals ( reject_domains [ idx ] ) ) return false ; } for ( int idx = 0 ; idx < accept_domains . length ; idx ++ ) { if ( accept_domains [ idx ] . length ( ) == 0 || accept_domains [ idx ] . charAt ( 0 ) == '.' && server . endsWith ( accept_domains [ idx ] ) || accept_domains [ idx ] . charAt ( 0 ) != '.' && server . equals ( accept_domains [ idx ] ) ) return true ; } return true ; }
returns whether this cookie should be accepted.
returns whether this cookie should be accepted .
// Check lists. Reject takes priority over accept