Package: qlandkartegt
Version: 1.5.0~dfsg1-1
Severity: normal
Tags: patch

Dear Maintainer,

appearently, the administrators of the Openstreetmap tile servers in 
the tile.openstreetmap.org domain decided to enforce or restrict their
"tile usage policy"[0].

Howevery, qlandkartegt is not compliant to that policy, most notably
the User-Agent part. Since the program does not set such a header, the 
QT library inserts "Mozilla/5.0", and appearently that string[1] is 
banned now. As a result, the OSM mapnik tiles are no longer usable in
qlandkartegt. 

The patch below rectifies that situation for Debian stable/wheezy,
tested, works for me. Please consider it for an upcoming point release 
since the usability of qlandkartegt is somewhat restricted now.

    Christoph

[0] http://wiki.openstreetmap.org/wiki/Tile_usage_policy
[1] To be honest, I was not able to reproduce that with wget and
    a haft-crafted User-Agent


-- System Information:
Debian Release: 7.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.10.27 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages qlandkartegt depends on:
ii  libc6                     2.13-38
ii  libdmtx0a                 0.7.2-2+build1
ii  libexif12                 0.6.20-3
ii  libgcc1                   1:4.7.2-5
ii  libgdal1                  1.9.0-3.1
ii  libgl1-mesa-glx [libgl1]  8.0.5-4+deb7u2
ii  libglu1-mesa [libglu1]    8.0.5-4+deb7u2
ii  libgps20                  3.6-4+deb7u1
ii  libjpeg8                  8d-1
ii  libproj0                  4.7.0-2
ii  libqt4-dbus               4:4.8.2+dfsg-11
ii  libqt4-network            4:4.8.2+dfsg-11
ii  libqt4-opengl             4:4.8.2+dfsg-11
ii  libqt4-script             4:4.8.2+dfsg-11
ii  libqt4-sql                4:4.8.2+dfsg-11
ii  libqt4-xml                4:4.8.2+dfsg-11
ii  libqt4-xmlpatterns        4:4.8.2+dfsg-11
ii  libqtcore4                4:4.8.2+dfsg-11
ii  libqtgui4                 4:4.8.2+dfsg-11
ii  libqtwebkit4              2.2.1-5
ii  libstdc++6                4.7.2-5
ii  libx11-6                  2:1.5.0-1+deb7u1
ii  libxext6                  2:1.3.1-2+deb7u1
ii  zlib1g                    1:1.2.7.dfsg-13

Versions of packages qlandkartegt recommends:
pn  gdal-bin             <none>
ii  gpsbabel             1.4.3-1
pn  qlandkartegt-garmin  <none>

Versions of packages qlandkartegt suggests:
pn  gpsd  <none>

-- no debconf information


commit 070a5c9a6a0da08a16c1e3c0d1a5c3a631c0a401
Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de>
Date:   Fri Jan 24 18:20:58 2014 +0100

    Set a User-Agent header

diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..44ab19f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+set-user-agent.patch
diff --git a/debian/patches/set-user-agent.patch 
b/debian/patches/set-user-agent.patch
new file mode 100644
index 0000000..c49785c
--- /dev/null
+++ b/debian/patches/set-user-agent.patch
@@ -0,0 +1,18 @@
+--- a/src/CMapTms.cpp
++++ b/src/CMapTms.cpp
+@@ -27,6 +27,7 @@
+ #include "CDlgMapTmsConfig.h"
+ #include "CMapSelectionRaster.h"
+ #include "CSettings.h"
++#include "version.h"
+ 
+ #include <QtGui>
+ #include <QtNetwork>
+@@ -591,6 +592,7 @@
+ 
+         QNetworkRequest request;
+         request.setUrl(req.url);
++        request.setRawHeader("User-Agent" , "QLandkarteGT/" VER_STR);
+         req.reply = accessManager->get(request);
+ 
+         pendRequests[req.url.toString()] = req;

Attachment: signature.asc
Description: Digital signature

Reply via email to