Skip to content

Commit

Permalink
Merge pull request #2654 from bsipocz/MAINT_https_for_sdss
Browse files Browse the repository at this point in the history
FIX: switching to https for sdss to avoid query issues
  • Loading branch information
bsipocz authored Feb 3, 2023
2 parents e4612b4 + 315c83f commit 36b2a4e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ oac
- Fix bug in parsing events that contain html tags (e.g. in their alias
field). [#2423]

sdss
^^^^

- Switching to https to avoid issues originating in relying on server side
redirects. [#2654]

simbad
^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion astroquery/sdss/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Conf(_config.ConfigNamespace):
Configuration parameters for `astroquery.sdss`.
"""
skyserver_baseurl = _config.ConfigItem(
'http://skyserver.sdss.org',
'https://skyserver.sdss.org',
'Base URL for catalog-related queries like SQL and Cross-ID.')
sas_baseurl = _config.ConfigItem(
'https://data.sdss.org/sas',
Expand Down
12 changes: 6 additions & 6 deletions astroquery/sdss/tests/test_sdss.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,25 +123,25 @@ def data_path(filename):
# interfaces are supported for DR11."
def url_tester(data_release):
if data_release < 10:
baseurl = 'http://skyserver.sdss.org/dr{}/en/tools/search/x_sql.asp'
baseurl = 'https://skyserver.sdss.org/dr{}/en/tools/search/x_sql.asp'
if data_release == 10:
baseurl = 'http://skyserver.sdss.org/dr{}/en/tools/search/x_sql.aspx'
baseurl = 'https://skyserver.sdss.org/dr{}/en/tools/search/x_sql.aspx'
if data_release == 11:
return
if data_release >= 12:
baseurl = 'http://skyserver.sdss.org/dr{}/en/tools/search/x_results.aspx'
baseurl = 'https://skyserver.sdss.org/dr{}/en/tools/search/x_results.aspx'
assert sdss.SDSS._last_url == baseurl.format(data_release)


def url_tester_crossid(data_release):
if data_release < 10:
baseurl = 'http://skyserver.sdss.org/dr{}/en/tools/crossid/x_crossid.asp'
baseurl = 'https://skyserver.sdss.org/dr{}/en/tools/crossid/x_crossid.asp'
if data_release == 10:
baseurl = 'http://skyserver.sdss.org/dr{}/en/tools/crossid/x_crossid.aspx'
baseurl = 'https://skyserver.sdss.org/dr{}/en/tools/crossid/x_crossid.aspx'
if data_release == 11:
return
if data_release >= 12:
baseurl = 'http://skyserver.sdss.org/dr{}/en/tools/search/X_Results.aspx'
baseurl = 'https://skyserver.sdss.org/dr{}/en/tools/search/X_Results.aspx'
assert sdss.SDSS._last_url == baseurl.format(data_release)


Expand Down

0 comments on commit 36b2a4e

Please sign in to comment.