-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Feature/enable cookie store at request level #1567
base: main
Are you sure you want to change the base?
Feature/enable cookie store at request level #1567
Conversation
@@ -71,12 +71,19 @@ public boolean exitAfterIntercept(Channel channel, | |||
|
|||
// This MUST BE called before Redirect30xInterceptor because latter assumes cookie store is already updated | |||
CookieStore cookieStore = config.getCookieStore(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CookieStore cookieStore = request.getCookieStore() != null ? request.getCookieStore() : config.getCookieStore() ;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already updated.
@@ -71,12 +71,19 @@ public boolean exitAfterIntercept(Channel channel, | |||
|
|||
// This MUST BE called before Redirect30xInterceptor because latter assumes cookie store is already updated | |||
CookieStore cookieStore = config.getCookieStore(); | |||
if (cookieStore != null) { | |||
CookieStore requestCookieStore = request.getCookieStore(); | |||
if (cookieStore != null || requestCookieStore != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please restore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored
|
||
if (requestCookieStore != null) { | ||
requestCookieStore.add(request.getUri(), c); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please restore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored
@tranchitam Did you get a chance to have a look at my comments. The idea is to be able to override the global CookieStore with one scoped at request level. Those 2 are exclusive and only one should be updated. |
6ea11f4
to
f8fab66
Compare
… into feature/enable-cookie-store-at-request-level
Hi @slandelle, I already updated the pull request to fix your comments. Please take a look. Thanks |
@slandelle Can you have a look? |
Also there is #1610 now, however seems liks it's just re-using the commits from this pull request here. |
@slandelle Could you please take a look to this one? |
Hi @slandelle, @TomGranot have you got time to take a look into this pull request again? If there is no issue, we really want to merge this PR to master as soon as possible. |
Motivations:
Changes:
Request
hasgetCookieStore()
method.RequestBuilder
hassetCookieStore()
method to set cookie store -> cookie store at request level isnull
by default.Results:
Related issue:
#1565