[locale] Log GeoIP attempt URL, use possibly-modified form

This commit is contained in:
Adriaan de Groot 2018-04-13 09:42:28 -04:00
parent d6f082752d
commit ec113e3df3

View File

@ -123,7 +123,7 @@ LocaleViewStep::fetchGeoIpTimezone()
if ( m_geoipStyle.isEmpty() || m_geoipStyle == "legacy" ) if ( m_geoipStyle.isEmpty() || m_geoipStyle == "legacy" )
{ {
actualUrl.append( "/json" ); actualUrl.append( "/json/" );
handler = new FreeGeoIP; handler = new FreeGeoIP;
} }
else if ( m_geoipStyle == "json" ) else if ( m_geoipStyle == "json" )
@ -142,6 +142,7 @@ LocaleViewStep::fetchGeoIpTimezone()
setUpPage(); setUpPage();
return; return;
} }
cDebug() << "Fetching GeoIP data from" << actualUrl;
QNetworkAccessManager *manager = new QNetworkAccessManager( this ); QNetworkAccessManager *manager = new QNetworkAccessManager( this );
connect( manager, &QNetworkAccessManager::finished, connect( manager, &QNetworkAccessManager::finished,
@ -162,7 +163,7 @@ LocaleViewStep::fetchGeoIpTimezone()
} ); } );
QNetworkRequest request; QNetworkRequest request;
request.setUrl( QUrl::fromUserInput( m_geoipUrl ) ); request.setUrl( QUrl::fromUserInput( actualUrl ) );
request.setAttribute( QNetworkRequest::FollowRedirectsAttribute, true ); request.setAttribute( QNetworkRequest::FollowRedirectsAttribute, true );
manager->get( request ); manager->get( request );
} }