Menu

#168 Viking does not download url if it is a HTTP referrer

v1.10
closed-invalid
nobody
None
5
2024-04-25
2024-03-05
No

Viking does not download url if it is a HTTP referrer:
Error log says:
Warning Download error: ~/.cache/viking/t45s4z0/5022/2851
Warning curl_download_uri: http response: 301 for uri https://tile.openstreetmap.de/tiles/osmde/13/5022/2851.png

Discussion

  • Rob Norris

    Rob Norris - 2024-04-06

    The map configuration has a property of whether (well the number of how many) to follow HTTP redirects - but this defaults to 0 (for reasons that I don't fully understand++) when the property is not specified. i.e. does not follow redirects.

    Thus, when you create your own map configurations it is recommended to set a value. This is covered in the manual in the Extending Viking section:

    "follow-location (optional) The maximum number of redirects allowed. The default is 0, i.e. no redirection. Use -1 for an unlimited number of redirects."

    e.g.

    <property name="follow-location">2</property>
    

    within the object class section.

    ++ Arguably the default should be more user friendly - such as a value of '-1'. The setting however has been this way since the original author wrote it in 2010; so I'm not aware of their reasoning. Perhaps as a feature that Viking doesn't follow what the server tells it unless otherwise, or may be in line with what the underlying library that handles downloading (libcurl) does - see https://everything.curl.dev/http/redirects.html or perhaps just that '0' is a typical computer default without great thoughts of usability for typical users.

     
  • Rob Norris

    Rob Norris - 2024-04-25
    • status: open --> closed-invalid
     

Log in to post a comment.