Examples of Cookie


Examples of com.caucho.hessian.util.CookieParser.Cookie

        protected void parseResponseHeaders(URLConnection conn) {
            List<String> cookieStrings = conn.getHeaderFields().get(HessianHttpProxy.COOKIE_SET.toString());
            if (cookieStrings != null) {
                String host = conn.getURL().getHost();
                for (String s : cookieStrings) {
                    Cookie cookie = CookieParser.parse(host, s);
                    HessianHttpProxy.cookieMap.put(cookie.host + cookie.path, cookie);
                    log.finest("Cookie cached: " + cookie.host + cookie.path + ":" + s);
                }
            }
        }
View Full Code Here

Examples of com.elibom.jogger.http.Cookie

    return null;
  }

  private Cookie map(javax.servlet.http.Cookie servletCookie) {
    Cookie cookie = new Cookie(servletCookie.getName(), servletCookie.getValue(), servletCookie.getMaxAge(), servletCookie.isHttpOnly());

    cookie.setPath(servletCookie.getPath());
    cookie.setDomain(servletCookie.getDomain());
    cookie.setSecure(servletCookie.getSecure());

    return cookie;
  }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.util.Cookie

    }

    public HttpResponse send() throws IOException {
        client.getOptions().setTimeout(timeoutInMillis);
        for (String cookie: cookies.keySet()) {
            client.getCookieManager().addCookie(new Cookie(domain, cookie, cookies.get(cookie)));
        }
        client.getCookieManager().setCookiesEnabled(applyCookies);
        client.getOptions().setRedirectEnabled(followRedirects);
        WebRequest request = new WebRequest(requestUrl(), method);
        request.setRequestParameters(requestParameters());
View Full Code Here

Examples of com.gistlabs.mechanize.cookie.Cookie

            schemeRegistry.register(httpsScheme);

            DefaultHttpClient httpClient = new DefaultHttpClient(new PoolingClientConnectionManager(schemeRegistry));

            MechanizeAgent agent = new MechanizeAgent();
            Cookie cookie2 = agent.cookies().addNewCookie("gpw_e24", ".", "oracle.com");
            cookie2.getHttpCookie().setPath("/");
            cookie2.getHttpCookie().setSecure(false);



            CookieStore cookieStore = new BasicCookieStore();
            BasicClientCookie cookie = new BasicClientCookie("gpw_e24", ".");
View Full Code Here

Examples of com.jayway.restassured.response.Cookie

        .queryParam( "user.name", username )
        .respond()
        .status( HttpStatus.SC_OK )
        .content( driver.getResourceBytes( "webhdfs-success.json" ) )
        .contentType( "application/json" );
    Cookie cookie = given()
        //.log().all()
        .auth().preemptive().basic( username, password )
        .header("X-XSRF-Header", "jksdhfkhdsf")
        .queryParam( "op", "MKDIRS" )
        .expect()
        //.log().all()
        .statusCode( HttpStatus.SC_OK )
        .header( "Set-Cookie", containsString( "JSESSIONID" ) )
        .header( "Set-Cookie", containsString( "HttpOnly" ) )
        .contentType( "application/json" )
        .content( "boolean", is( true ) )
        .when().put( driver.getUrl( "WEBHDFS" ) + "/v1" + root + "/dir" ).getDetailedCookie( "JSESSIONID" );
    assertThat( cookie.isSecured(), is( true ) );
    assertThat( cookie.getPath(), is( "/gateway/cluster" ) );
    assertThat( cookie.getValue().length(), greaterThan( 16 ) );
    driver.assertComplete();
  }
View Full Code Here

Examples of com.ning.http.client.Cookie

        if (maxAge < -1) {
            maxAge = -1;
        }

        return new Cookie(domain, cookieName, cookieValue, path, maxAge, secure);
    }
View Full Code Here

Examples of com.sun.grizzly.util.http.Cookie

            // Flush some cookies
            try {
                Map<String, Http.Cookie> cookies = Response.current().cookies;
                for (Http.Cookie cookie : cookies.values()) {
                    if (cookie.sendOnError) {
                        Cookie c = new Cookie(cookie.name, cookie.value);
                        c.setSecure(cookie.secure);
                        c.setPath(cookie.path);
                        if (cookie.domain != null) {
                            c.setDomain(cookie.domain);
                        }
                        response.addCookie(c);
                    }
                }
            } catch (Exception exx) {
View Full Code Here

Examples of com.volantis.shared.net.http.cookies.Cookie

        cookies[1] = new javax.servlet.http.Cookie("Two", "Two");
        request.setCookies(cookies);

        HTTPMessageEntities entities = factory.createCookies(request);

        Cookie cookieArray [] = new Cookie[2];
        cookieArray[0] = new CookieImpl("One", null, null);
        cookieArray[1] = new CookieImpl("Two", null, null);

        // enusre that a SimpleHTTPMessageEntities is factored
        assertEquals("createCookies should return a " +
View Full Code Here

Examples of com.volantis.shared.net.url.http.Cookie

    // javadoc inherited
    public HTTPMessageEntities getCookies() throws HTTPException {
        if (cookies == null) {
            cookies = FACTORY.createHTTPMessageEntities();
            for (Iterator iter = httpContent.getCookies(); iter.hasNext(); ) {
                final Cookie cookie = (Cookie) iter.next();
                final com.volantis.shared.net.http.cookies.Cookie cookieEntity =
                    FACTORY.createCookie(
                        cookie.getName(), cookie.getDomain(), cookie.getPath());
                cookieEntity.setComment(cookie.getComment());
                cookieEntity.setMaxAge(cookie.getMaxAge());
                cookieEntity.setSecure(cookie.isSecure());
                cookieEntity.setValue(cookie.getValue());
                cookieEntity.setVersion(
                    CookieVersion.getCookieVersion(cookie.getVersion()));
                cookies.add(cookieEntity);
            }
        }
        return cookies;
    }
View Full Code Here

Examples of com.vtence.molecule.http.Cookie

        if (!shouldCommit(session)) {
            return;
        }
        if (session.invalid()) {
            destroy(session);
            Cookie cookie = new Cookie(name, session.id()).maxAge(0);
            response.add(cookie);
            return;
        }

        String sid = save(session);
        if (newSession(request, sid) || expires(session)) {
            Cookie cookie = new Cookie(name, sid)
                    .httpOnly(true)
                    .maxAge(session.maxAge());
            response.add(cookie);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.