[
https://issues.apache.org/jira/browse/AXIS2-6083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Suhr updated AXIS2-6083:
--------------------------------
Description:
If you use a service with Cookies on server side and you use
`manageSession`then the folowing calls are not send the Cookie header again.
This is because the
`org.apache.axis2.transport.http.HTTPSender#obtainHTTPHeaderInformation` not
read the correct cookies to store them in property. (see
[obtainHTTPHeaderInformation|https://github.com/apache/axis-axis2-java-core/blob/092b1a82226b809c6d554d534e002c40b6a9ae26/modules/transport/http/src/main/java/org/apache/axis2/transport/http/HTTPSender.java#L488])
I created a small test for it in 1.8.2 (httpclient4) and 2.0.0 (httpclient5).
- 1.8.2:
https://github.com/MCMicS/axis-axis2-java-core/blob/1ffc449eedf4213f710e8f274a89bf4c0e2760f9/modules/transport/http/test/org/apache/axis2/transport/http/HTTPSenderTest.java#L308
- 2.0.0:
https://github.com/MCMicS/axis-axis2-java-core/blob/6fbcf725a5769d44ae32624f322ac00d8e45785f/modules/transport/http/src/test/java/org/apache/axis2/transport/http/HTTPSenderTest.java#L308
in httpclient4 the `Map<String,String> cookies = request.getCookies();`
contains only Cookies by name but with new httpclient5 implmentation it
contains all header (including the `Set-Cookie`)
I also created a PR for this:
https://github.com/apache/axis-axis2-java-core/pull/881
Dont know if you prefer this solution. Another apporch could be to use
CookieStore and get cookies from there
was:
If you use a service with Cookies on server side and you use
`manageSession`then the folowing calls are not send the Cookie header again.
This is because the
`org.apache.axis2.transport.http.HTTPSender#obtainHTTPHeaderInformation` not
read the correct cookies to store them in property. (see
[obtainHTTPHeaderInformation|https://github.com/apache/axis-axis2-java-core/blob/092b1a82226b809c6d554d534e002c40b6a9ae26/modules/transport/http/src/main/java/org/apache/axis2/transport/http/HTTPSender.java#L488])
I think it is due the change
I created a small test for it in 1.8.2 (httpclient4) and 2.0.0 (httpclient5).
- 1.8.2:
https://github.com/MCMicS/axis-axis2-java-core/blob/1ffc449eedf4213f710e8f274a89bf4c0e2760f9/modules/transport/http/test/org/apache/axis2/transport/http/HTTPSenderTest.java#L308
- 2.0.0:
https://github.com/MCMicS/axis-axis2-java-core/blob/6fbcf725a5769d44ae32624f322ac00d8e45785f/modules/transport/http/src/test/java/org/apache/axis2/transport/http/HTTPSenderTest.java#L308
in httpclient4 the `Map<String,String> cookies = request.getCookies();`
contains only Cookies by name but with new httpclient5 implmentation it
contains all header (including the `Set-Cookie`)
I also created a PR for this:
https://github.com/apache/axis-axis2-java-core/pull/881
Dont know if you prefer this solution. Another apporch could be to use
CookieStore and get cookies from there
> Cookie Handling not work with 2.0.0
> -----------------------------------
>
> Key: AXIS2-6083
> URL: https://issues.apache.org/jira/browse/AXIS2-6083
> Project: Axis2
> Issue Type: Bug
> Components: transports
> Affects Versions: 2.0.0
> Reporter: Michael Suhr
> Assignee: Robert Lazarski
> Priority: Major
>
> If you use a service with Cookies on server side and you use
> `manageSession`then the folowing calls are not send the Cookie header again.
>
> This is because the
> `org.apache.axis2.transport.http.HTTPSender#obtainHTTPHeaderInformation` not
> read the correct cookies to store them in property. (see
> [obtainHTTPHeaderInformation|https://github.com/apache/axis-axis2-java-core/blob/092b1a82226b809c6d554d534e002c40b6a9ae26/modules/transport/http/src/main/java/org/apache/axis2/transport/http/HTTPSender.java#L488])
> I created a small test for it in 1.8.2 (httpclient4) and 2.0.0 (httpclient5).
> - 1.8.2:
> https://github.com/MCMicS/axis-axis2-java-core/blob/1ffc449eedf4213f710e8f274a89bf4c0e2760f9/modules/transport/http/test/org/apache/axis2/transport/http/HTTPSenderTest.java#L308
> - 2.0.0:
> https://github.com/MCMicS/axis-axis2-java-core/blob/6fbcf725a5769d44ae32624f322ac00d8e45785f/modules/transport/http/src/test/java/org/apache/axis2/transport/http/HTTPSenderTest.java#L308
> in httpclient4 the `Map<String,String> cookies = request.getCookies();`
> contains only Cookies by name but with new httpclient5 implmentation it
> contains all header (including the `Set-Cookie`)
> I also created a PR for this:
> https://github.com/apache/axis-axis2-java-core/pull/881
> Dont know if you prefer this solution. Another apporch could be to use
> CookieStore and get cookies from there
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]