Closed GoogleCodeExporter closed 8 years ago
Please let me know how I can get my code change reviewed, so that I commit the
fix for this issue.
Original comment by chandu.d...@gmail.com
on 14 Aug 2012 at 7:24
I'm going to abstract away the HTTP implementation for the client. It'll make
it easier to do things like this. With that said, cookies aren't part of the
JSON-RPC spec, so it's not a good idea to accept a patch to the existing code
that merely remembers previous cookies. That said, i haven't seen your patch -
so i don't know what you've done exactly :)
Original comment by br...@chee.rs
on 20 Aug 2012 at 4:11
I agree with abstracting the HTTP implementation from the client.
I have added the following lines of code in the JsonRpcHttpClient.invoke(...)
method at line # 128, before the return statement.
String cookie = con.getHeaderField("Set-Cookie");
if (cookie != null && cookie.contains("JSESSIONID")) {
int start = cookie.indexOf("JSESSIONID");
int end = cookie.indexOf(';', start);
if (end < 0)
end = cookie.length();
cookie = cookie.substring(start, end);
headers.put("Cookie", cookie);
}
This just stores the JESSIONID cookie, just to maintain the HTTP session.
I am not a member of this project, so I will not be able to checkout the
project or file in the read/write mode.
Original comment by chandu.d...@gmail.com
on 21 Aug 2012 at 3:16
You can check it out in read only mode, edit it, and created a patch.
With that said, I still wont accept a patch with the code you've pasted above.
1) HTTP cookies aren't part of the JSON-RPC spec
2) It's not safe to assume that the cookie's name is "JSESSIONID" every time
When we've abstracted the HTTP implementation we can talk about supporting this
functionality.
Original comment by brian.di...@gmail.com
on 27 Aug 2012 at 1:03
Marking this invalid - when the new HTTP abstraction is in place you can do
whatever configuration is needed to make this happen. Cookies are not part of
the JSON-RPC spec.
Original comment by brian.di...@gmail.com
on 3 Oct 2012 at 11:25
Original issue reported on code.google.com by
chandu.d...@gmail.com
on 14 Aug 2012 at 7:19