Fix for JPL downloads.

Valentin Boettcher valentin at boettcher.cf
Wed Mar 22 03:09:23 UTC 2017


Here is a little patch to fix the comet/asteroid update from JPL, which
now requires https.


diff --git a/kstars/skycomponents/asteroidscomponent.cpp
b/kstars/skycomponents/asteroidscomponent.cpp
index ba731b573..fe1babdb2 100644
--- a/kstars/skycomponents/asteroidscomponent.cpp
+++ b/kstars/skycomponents/asteroidscomponent.cpp
@@ -272,7 +272,7 @@ void AsteroidsComponent::updateDataFile()
     QObject::connect(downloadJob, SIGNAL(downloaded()), this,
SLOT(downloadReady()));
     QObject::connect(downloadJob, SIGNAL(error(QString)), this,
SLOT(downloadError(QString)));
 
-    QUrl url = QUrl( "http://ssd.jpl.nasa.gov/sbdb_query.cgi" );
+    QUrl url = QUrl( "https://ssd.jpl.nasa.gov/sbdb_query.cgi" );
 
     QByteArray mag =
QString::number(Options::magLimitAsteroidDownload()).toUtf8();
     QByteArray post_data = KSUtils::getJPLQueryString("ast",
"AcBdBiBhBgBjBlBkBmBqBbAiAjAgAkAlApAqArAsBsBtCh",
QVector<KSUtils::JPLFilter> {{"Ai", "<", mag}});
diff --git a/kstars/skycomponents/cometscomponent.cpp
b/kstars/skycomponents/cometscomponent.cpp
index 3ada2a984..7faf91675 100644
--- a/kstars/skycomponents/cometscomponent.cpp
+++ b/kstars/skycomponents/cometscomponent.cpp
@@ -229,7 +229,7 @@ void CometsComponent::updateDataFile()
     connect(downloadJob, SIGNAL(downloaded()), this,
SLOT(downloadReady()));
     connect(downloadJob, SIGNAL(error(QString)), this,
SLOT(downloadError(QString)));
 
-    QUrl url = QUrl( "http://ssd.jpl.nasa.gov/sbdb_query.cgi" );
+    QUrl url = QUrl( "https://ssd.jpl.nasa.gov/sbdb_query.cgi" );
     QByteArray post_data = KSUtils::getJPLQueryString("com",
"AcBdBiBgBjBlBkBqBbAgAkAlApAqArAsBsBtChAmAn", 
QVector<KSUtils::JPLFilter> {{"Af", "!=", "D"}});
 
     downloadJob->post(url, post_data);



More information about the Kstars-devel mailing list