-
Notifications
You must be signed in to change notification settings - Fork 0
/
PROTOCOL
executable file
·43 lines (20 loc) · 1.47 KB
/
PROTOCOL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Here's a description of the protocol and filesystem used in CREST-fs
GET /path/blah/blah/myresource.blah
Is used to read the contents of a resource
GET /path/to/folder is also used to retrieve directory contents, if 'folder' is a directory, then CREST expects to be redirected to:
GET /path/to/folder/ <-- notice the trailing slash
The contents of the folder can be described in an HTML-esque style or a
custom format called 'directory manifest'.
HTML-esque style folder contents don't have to be in HTML, but resources within need to be described as follows:
<a href='resource'>resource</a>
Note that the 'href' attribute and the resource name are identical. "Links" where they are _not_ identical will not be counted as resources.
Directory manifest will be described with a MIME-type of:
x-vnd.bespin.corp/directory-manifest
The contents of which will be:
memberetag membername
Trailing slashes are required for subdirectories.
HTTP Redirects will be interpreted as 'symlinks'.
e.g. when you request http://something.com/blah/blah and get a redirect to http://something.com/foo/bar, that will be interpreted in the filesystem as "something.com/blah/blah is a symlink to something.com/foo/bar"
Received Last-Modified headers will read as mtimes
Etags will be used with conditional GET's to aggressive cache and fetch changes to files.
The X-Bespin-CREST: HTTP header is required on all pages! This is to detect a web service provider that is redirecting requests, ro messing with DNS.