Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is only one param but I had set all cookies in loadForRequest(HttpUrl url). #29

Open
yinguanping opened this issue Feb 8, 2017 · 1 comment

Comments

@yinguanping
Copy link

Cookie mi=a8f64fbd22f8f70afee8a48c2c18f202
This is my request cookie data.
@OverRide
synchronized public List loadForRequest(HttpUrl url) {
List cookiesToRemove = new ArrayList<>();
List validCookies = new ArrayList<>();

    for (Iterator<Cookie> it = cache.iterator(); it.hasNext(); ) {
        Cookie currentCookie = it.next();

        if (isCookieExpired(currentCookie)) {
            cookiesToRemove.add(currentCookie);
            it.remove();

        } else if (currentCookie.matches(url)) {
            validCookies.add(currentCookie);
        }
    }

    persistor.removeAll(cookiesToRemove);

    return validCookies;
}

I use your method for add request cookie. But there is only one param when I request server,and in the debug I had ensure the return validCookies is a unbroken cookie.
It gives me a headache,Have you met this situation???
Please help me!!!

@franmontiel
Copy link
Owner

I'm sorry but I think I'm not getting what your problem is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants