RobertDeveloper / RMaps.0.9.x

Automatically exported from code.google.com/p/robertprojects
43 stars 27 forks source link

openstreetmap not working, 403 access denied from tile server #147

Closed r00t- closed 5 years ago

r00t- commented 5 years ago

as of 2019-05-28, tile.openstreetmap.org is rejecting requests from rmaps. (i am using com.robert.maps_8140_0.9.4.apk) i am not aware of the exact policies for access to tile.openstreetmap.org, but the main reason would appear to be that it uses a generic android user agent, instead of identifying itself as rmaps.

a request/response as sniffed with a proxy setup:

GET http://tile.openstreetmap.org/15/17024/10902.png
User-Agent:        Dalvik/2.1.0 (Linux; U; Android 7.1.1; MI MAX 2 MIUI/8.11.15)                         
Host:              tile.openstreetmap.org                                                                
Accept-Encoding:   gzip                                                                                  
Proxy-Connection:  close                                                                                 
Connection:        close                                         

HTTP/... 403 access denied
Server:          squid/2.7.STABLE9                                                                       
Date:            Wed, 29 May 2019 00:08:09 GMT                                                           
Content-Type:    text/html                                                                               
Content-Length:  1223                                                                                    
X-Squid-Error:   ERR_ACCESS_DENIED 0                                                                     
X-Cache:         MISS from konqi.openstreetmap.org                                                       
X-Cache-Lookup:  NONE from konqi.openstreetmap.org:3128                                                  
Via:             1.0 konqi.openstreetmap.org:3128 (squid/2.7.STABLE9)                                    
Connection:      close               

<html>
<head>
  <meta type="copyright" content="">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>ERROR: The requested URL could not be retrieved</title>
  <style type="text/css">
    <!--
     %l

    body
    :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
    :lang(he) { direction: rtl; }
     -->
  </style>
</head>
<body id="ERR_ACCESS_DENIED">
  <div id="titles">
    <h1>ERROR</h1>
    <h2>The requested URL could not be retrieved</h2>
  </div>
  <hr>
  <div id="content">
    <p>
      The following error was encountered while trying to retrieve the URL:
      <a href="http://tile.openstreetmap.org/15/17024/10902.png">http://tile.openstreetmap.org/15/17024/10902.png</a>
    </p>
    <blockquote id="error">
      <p>
        <b>Access Denied.</b>
      </p>
    </blockquote>
    <p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p>
    <p>
      Your cache administrator is
      <a href="mailto:webmaster@openstreetmap.org">webmaster@openstreetmap.org</a>
      .
    </p>
    <br>
  </div>
  <hr>
  <div id="footer">
    <p>Generated Wed, 29 May 2019 00:08:09 GMT by konqi.openstreetmap.org (squid/2.7.STABLE9)</p>
    <!-- ERR_ACCESS_DENIED -->
  </div>
</body>
r00t- commented 5 years ago

this had been "fixed", the tile-servers accept the requests again. (the issue of being in violation of the policy by not setting a custom user-agent remains.)