mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-13 12:42:20 +00:00
Velo Hero: Use HTTP with TLS and custom User-Agent (#3885)
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
* - so... hack around this with currentRequest + dispatchRequest TODO: fix
|
||||
*/
|
||||
|
||||
const QString VELOHERO_URL( "http://app.velohero.com" );
|
||||
const QString VELOHERO_URL( "https://app.velohero.com" );
|
||||
|
||||
class VeloHeroParser : public QXmlDefaultHandler
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
static const QString VELOHERO_URL( "http://app.velohero.com" );
|
||||
static const QString VELOHERO_URL( "https://app.velohero.com" );
|
||||
|
||||
Velohero::Velohero(Context *context) : CloudService(context), context(context), root_(NULL) {
|
||||
|
||||
@@ -99,6 +99,7 @@ Velohero::open(QStringList &errors)
|
||||
request.setRawHeader("Accept-Encoding", "identity");
|
||||
request.setRawHeader("Accept", "application/xml");
|
||||
request.setRawHeader("Accept-Charset", "utf-8");
|
||||
request.setRawHeader("User-Agent", "GoldenCheetah/1.0");
|
||||
|
||||
QEventLoop loop;
|
||||
reply = nam->get(request);
|
||||
@@ -179,6 +180,7 @@ Velohero::writeFile(QByteArray &data, QString remotename, RideFile *ride)
|
||||
request.setRawHeader( "Accept-Encoding", "identity" );
|
||||
request.setRawHeader( "Accept", "application/xml" );
|
||||
request.setRawHeader( "Accept-Charset", "utf-8" );
|
||||
request.setRawHeader( "User-Agent", "GoldenCheetah/1.0" );
|
||||
|
||||
// this must be performed asyncronously and call made
|
||||
// to notifyWriteCompleted(QString remotename, QString message) when done
|
||||
|
||||
Reference in New Issue
Block a user