Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

ways deleted returns 404, while not created ways return 200 #199

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: erik[at]tiq.com
[Submitted to the original trac issue database at 9.04am, Wednesday, 19th April 2006]

Ways that doesn't exist should return 404, ways that haven't been created will not return 404. Perhaps they should?

curl -vu $userpass http://www.openstreetmap.org/api/0.3/way/1
curl -vu $userpass http://www.openstreetmap.org/api/0.3/way/100000000000000
curl -vu $userpass http://www.openstreetmap.org/api/0.3/way/10000

These curl lines will fetch one way that is deleted one that was never created and one that exists. first and second should return 404, and only the third should return a 200.

curl -vu $userpass http://www.openstreetmap.org/api/0.3/way/100000000000000
* About to connect() to www.openstreetmap.org port 80
*   Trying 128.40.59.140... connected
* Connected to www.openstreetmap.org (128.40.59.140) port 80
* Server auth using Basic with user 'erik[at]tiq.com'
> GET /api/0.3/way/100000000000000 HTTP/1.1
> Authorization: Basic ZXJpa0B0aXEuY29tOmRlYmNvbmZzcGVjaWFs
> User-Agent: curl/7.14.0 (x86_64-pc-linux-gnu) libcurl/7.14.0 OpenSSL/0.9.7g zlib/1.2.3 libidn/0.5.13
> Host: www.openstreetmap.org
> Accept: */*
>

< HTTP/1.1 200 OK
< Date: Wed, 19 Apr 2006 08:40:57 GMT
< Server: Apache/2.0.55 (Debian) mod_ruby/1.2.4 Ruby/1.8.4(2005-10-29) DAV/2 SVN/1.2.3 PHP/4.4.0-4
< Transfer-Encoding: chunked
< Content-Type: text/plain
* Connection #0 to host www.openstreetmap.org left intact
* Closing connection #0




# curl -vu $userpass http://www.openstreetmap.org/api/0.3/way/10000
* About to connect() to www.openstreetmap.org port 80
*   Trying 128.40.59.140... connected
* Connected to www.openstreetmap.org (128.40.59.140) port 80
* Server auth using Basic with user 'erik[at]tiq.com'
> GET /api/0.3/way/10000 HTTP/1.1
> Authorization: Basic ZXJpa0B0aXEuY29tOmRlYmNvbmZzcGVjaWFs
> User-Agent: curl/7.14.0 (x86_64-pc-linux-gnu) libcurl/7.14.0 OpenSSL/0.9.7g zlib/1.2.3 libidn/0.5.13
> Host: www.openstreetmap.org
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 19 Apr 2006 08:41:41 GMT
< Server: Apache/2.0.55 (Debian) mod_ruby/1.2.4 Ruby/1.8.4(2005-10-29) DAV/2 SVN/1.2.3 PHP/4.4.0-4
< Transfer-Encoding: chunked
< Content-Type: text/plain
<?xml version="1.0"?>
<osm version="0.3" generator="OpenStreetMap server">
  <way id="10000" timestamp="2006-04-16 21:28:26">
    <seg id="678322"/>
    <tag k="name" v="Lark St"/>
    <tag k="from_zip" v="99507"/>
    <tag k="to_zip" v="99507"/>
  </way>
</osm>
* Connection #0 to host www.openstreetmap.org left intact
* Closing connection #0



curl -vu $userpass http://www.openstreetmap.org/api/0.3/way/1
* About to connect() to www.openstreetmap.org port 80
*   Trying 128.40.59.140... connected
* Connected to www.openstreetmap.org (128.40.59.140) port 80
* Server auth using Basic with user 'erik[at]tiq.com'
> GET /api/0.3/way/1 HTTP/1.1
> Authorization: Basic ZXJpa0B0aXEuY29tOmRlYmNvbmZzcGVjaWFs
> User-Agent: curl/7.14.0 (x86_64-pc-linux-gnu) libcurl/7.14.0 OpenSSL/0.9.7g zlib/1.2.3 libidn/0.5.13
> Host: www.openstreetmap.org
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Date: Wed, 19 Apr 2006 08:41:47 GMT
< Server: Apache/2.0.55 (Debian) mod_ruby/1.2.4 Ruby/1.8.4(2005-10-29) DAV/2 SVN/1.2.3 PHP/4.4.0-4
< Content-Length: 219
< Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /ruby/api/0.3/multi.rb was not found on this server.</p>
</body></html>
* Connection #0 to host www.openstreetmap.org left intact
* Closing connection #0
@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 11.46pm, Tuesday, 12th June 2007]

In the rails port a way that has not been created gives 404 (Not Found) and a way that has been deleted gives 410 (Gone).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant