BaseXdb/basex — Issue #351: When getting a 404 etc. back from HTTP
Author: jidanni
Created: 2012-01-25 08:11:35+00:00
State: open

1. Don't append the local directory when reading from a file.

$ echo 'doc("http://localhost:8080/http/example.net/")' > r.xq
$ basex r.xq
Stopped at line 1, column 46 in /tmp/r.xq:
[FODC0002] File or directory "/tmp/http:/localhost:8080/http/example.net" not found.

2. Mention the 404

$ basex -q 'doc("http://localhost:8080/http/example.net/")'
Stopped at line 1, column 46:
[FODC0002] http://localhost:8080/http/example.net/

Here is what is given to basex in these cases for your reference.

$ HEAD http://localhost:8080/http/example.net/
404 WWWOFFLE Will Get
Connection: close
Date: Wed, 18 Jan 2012 00:41:45 GMT
Server: WWWOFFLE/2.9f
Content-Type: text/html
Client-Date: Wed, 18 Jan 2012 00:41:45 GMT
Client-Peer: 127.0.0.1:8080
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Proxy-Connection: close

BaseX 7.0.2