aboutsummaryrefslogtreecommitdiff
path: root/jobs/basejob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/basejob.cpp')
-rw-r--r--jobs/basejob.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp
index 20fb68f6..9d5c5ed6 100644
--- a/jobs/basejob.cpp
+++ b/jobs/basejob.cpp
@@ -137,7 +137,11 @@ void BaseJob::setRequestData(const BaseJob::Data& data)
void BaseJob::Private::sendRequest()
{
QUrl url = connection->baseUrl();
- url.setPath( url.path() + "/" + apiEndpoint );
+ QString path = url.path();
+ if (!path.endsWith('/') && !apiEndpoint.startsWith('/'))
+ path.push_back('/');
+
+ url.setPath( path + apiEndpoint );
url.setQuery(requestQuery);
QNetworkRequest req {url};
@@ -207,6 +211,7 @@ void BaseJob::gotReply()
BaseJob::Status BaseJob::checkReply(QNetworkReply* reply) const
{
+ qCDebug(d->logCat) << this << "returned from" << reply->url().toDisplayString();
if (reply->error() != QNetworkReply::NoError)
qCDebug(d->logCat) << this << "returned" << reply->error();
switch( reply->error() )