Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

HTTP Cookies are discarded #94

Open
cofinoa opened this issue Jan 28, 2015 · 6 comments
Open

HTTP Cookies are discarded #94

cofinoa opened this issue Jan 28, 2015 · 6 comments
Assignees

Comments

@cofinoa
Copy link
Contributor

cofinoa commented Jan 28, 2015

The netcdf-java client applictions/utils are not storing cookies sent back by server.

The cookies returned from server are discarded creating a new session on every connection to server (DODS or HTTP).

For example, if user autentication is required, this makes that every request to server create a new session and therefore a new athentication process.

@DennisHeimbigner
Copy link
Contributor

Are you using the current 4.6 branch? I made a whole
bunch of changes to properly handle cookies, but may
have screwed up something.
If you are using 4.6, then try this.

  1. create a file ./.ocrc with this content:
    HTTP.COOKIEJAR=/tmp/cookes
    The /tmp/cookies can be any path.
    See if this works and let me know what happens
    =Dennis Heimbigner
    Unidata

@cofinoa
Copy link
Contributor Author

cofinoa commented Jan 29, 2015

The issue is for 4.3.22.
I have tried 4.5.4 and 4.6 branches and cookies are working (tested with ToolsUI)

Antonio
University of Cantabria

P.S.: I haven't tried the .ocrc solution, but BTW.... where is implemented this feature? I havn't find any reference to that in the code for the 4.6 branch

@DennisHeimbigner
Copy link
Contributor

Sorry, my mistake. For some reason
I thought you were talking about netcdf-c.
Ignore my previous message.

For java, is there some reason you need to use 4.3.22?
In 4.5, we switched from Apache httpclient 3.x to 4.2.
It is possible that 3.x handled cookies incorrectly.

=Dennis Heimbigner
Unidata

cofinoa wrote:

The issue is for 4.3.22.
I have tried 4.5.4 and 4.6 branches and cookies are working (tested with ToolsUI)

Antonio
University of Cantabria

P.S.: I haven't tried the .ocrc solution, but BTW.... where is implemented this feature? I havn't find any reference to that in the code for the 4.6 branch


Reply to this email directly or view it on GitHub:
#94 (comment)

@cofinoa
Copy link
Contributor Author

cofinoa commented Jan 29, 2015

The netcdf-java 4.5 branches has issues with SSL providers. For more details about that see more details at issue #91 and my associated pull-request.

Also the JRE version >=1.7 could be a problem for our tools which are based on 4.3.22, and migrate to 4.5 it's planned but no in a short time.

I have tried to fix this in 4.3.22, but I need some help about where to look to try to debug and fix the issue. The HTTPSession and HTTPClient classes are a little bit obscure for me, mainly because I don't understand well how the httpclient library 3.1 works.

I would appreciate any help on this.

Antonio

@JohnLCaron
Copy link
Collaborator

Hi Antonio:

It would be best for us to fix any problems that you are seeing on the
4.5/4.6 branch. I strongly recommend that you plan on upgrading. Let us
know if that is a possibility for you.

John

On Thu, Jan 29, 2015 at 1:44 PM, cofinoa [email protected] wrote:

The netcdf-java 4.5 branches has issues with SSL providers. For more
details about that see more details at issue #91
#91 and my associated
pull-request.

Also the JRE version >=1.7 could be a problem for our tools which are
based on 4.3.22, and migrate to 4.5 it's planned but no in a short time.

I have tried to fix this in 4.3.22, but I need some help about where to
look to try to debug and fix the issue. The HTTPSession and HTTPClient
classes are a little bit obscure for me, mainly because I don't understand
well how the httpclient library 3.1 works.

I would appreciate any help on this.

Antonio


Reply to this email directly or view it on GitHub
#94 (comment).

@DennisHeimbigner
Copy link
Contributor

Since we do not have any way to test this ourselves, we need help
to test that it is working again in 4.6

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

No branches or pull requests

4 participants