-
Notifications
You must be signed in to change notification settings - Fork 37
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
HTTP to HTTPS #129
Comments
If possible, it would be best to take the time to make sure whatever code is making the http requests checked the server response to see if there was a http redirect, and if so, checked the location returned in the server response to find the the new location of the resource. |
Luckily most of not all of the url access in the IDV goes through a single
method IOUtil.getInputStream so making this change shouldn’t be too hard
Jeff
…On Mon, Nov 27, 2017 at 4:26 PM Sean Arms ***@***.***> wrote:
If possible, it would be best to take the time to make sure whatever code
is making the http requests checked the server response to see if there was
a http redirect, and if so, checked the location returned in the server
response to find the the new location of the resource.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#129 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABonTz8Oy4noqU-ZdssuSbF9Zvdb0GGrks5s60UXgaJpZM4QsZKK>
.
|
Awhile back I basically did what Sean and Jeff proposed for McV, though we had to back out of the change for a few reasons (that escape me at the moment). Here's what I had: https://github.com/Unidata/IDV/compare/master...jon4than:http-redirects?expand=1 I can create a pull request if you'd like. |
Jon,
Please create a pull request. Your solution is better.
Yuan
…On Tue, Nov 28, 2017 at 5:40 PM, Jonathan Beavers ***@***.***> wrote:
Awhile back I basically did what Sean and Jeff proposed for McV, though we
had to back out of the change for a few reasons (that escape me at the
moment). Here's what I had:
master...jon4than:
http-redirects?expand=1
I can create a pull request if you'd like.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#129 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABI4rzhd5I7P_fc2LTSUJ6H4MM5HpIRgks5s7KgMgaJpZM4QsZKK>
.
|
I'm not sure who all did what but I made a change to IOUtil just now (so I
could load some bundles for some drilsdown work) before I saw that its been
changed. I'm checking my changes in and overriding the other changes as it
seems like just swapping out http for https might not be an effective way
to handle redirects as there might be server and/or path changes as well.
Below is the diff
-Jeff
int response = huc.getResponseCode();
//Check for redirect
if (response == HttpURLConnection.HTTP_MOVED_TEMP
|| response == HttpURLConnection.HTTP_MOVED_PERM
|| response == HttpURLConnection.HTTP_SEE_OTHER) {
String newUrl =
connection.getHeaderField("Location");
connection = new URL(newUrl).openConnection();
connection.setAllowUserInteraction(true);
huc = (HttpURLConnection) connection;
}
1297,1301d1306
< } else if (huc.getResponseCode() == 301 ||
huc.getResponseCode() == 302) {
< String urlStr =
url.toString().replaceFirst("http:", "https:");
< URL newURL = new URL(urlStr);
< connection = newURL.openConnection();
< connection.setReadTimeout(30000); //30 sec
…On Tue, Nov 28, 2017 at 8:06 PM, yuanho ***@***.***> wrote:
Jon,
Please create a pull request. Your solution is better.
Yuan
On Tue, Nov 28, 2017 at 5:40 PM, Jonathan Beavers <
***@***.***>
wrote:
> Awhile back I basically did what Sean and Jeff proposed for McV, though
we
> had to back out of the change for a few reasons (that escape me at the
> moment). Here's what I had:
>
> master...jon4than:
> http-redirects?expand=1
>
> I can create a pull request if you'd like.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#129 (comment)>, or
mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/ABI4rzhd5I7P_
fc2LTSUJ6H4MM5HpIRgks5s7KgMgaJpZM4QsZKK>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#129 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABonT7n7txxXnYBEpPRqRePR0G6-M42Qks5s7ModgaJpZM4QsZKK>
.
|
Related to #128. There are many references in the IDV that point to obsolete
http
URLs. Migrate tohttps
. Document what needs to be updated in this issue.https://www.unidata.ucar.edu/georesources/*
The text was updated successfully, but these errors were encountered: