forked from cherokee/webserver
-
Notifications
You must be signed in to change notification settings - Fork 1
/
modules_handlers_common.txt
67 lines (53 loc) · 2.17 KB
/
modules_handlers_common.txt
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
== link:index.html[Index] -> link:modules.html[Modules] -> link:modules_handlers.html[Handlers]
Handler: List & Send
--------------------
The **List & Send** (``common`` internally) handler behavior depends
on whether it replies a request for a directory or a file.
In case a directory is requested, it will use the
link:modules_handlers_dirlist.html[Listing Only] handler in order to
list its contents. And, in case a file is request, it will use the
link:modules_handlers_file.html[File Sending] handler.
[[parameters]]
Parameters
~~~~~~~~~~
[cols="20%,10%,70%",options="header"]
|==================================================================
|Parameters |Type |Description
|`allow_pathinfo` |boolean |Makes the handler to stop parsing the
pathinfo string. Default: `Disabled`.
|`allow_dirlist` |boolean |Enables showing the contents of a
directory.
|==================================================================
Besides, it inherits all the parameters from the
link:modules_handlers_file.html[file/Static Content] and
link:modules_handlers_dirlist.html[dirlist/Only listing] handlers.
This example shows the practical effect of **pathinfo**::
+
----
$ echo "This is a test" > /tmp/1/2/test
$ curl http://localhost/1/2/test
This is a test
$ curl http://localhost/1/2/test/this/is/pathinfo
This is a test
$ curl -D - http://localhost/1/2/test.no | grep HTTP
HTTP/1.1 404 Not Found
----
[[examples]]
Examples
~~~~~~~~
Here is a basic example.
.Configuration
image::media/images/admin_handler_dirlist.png[Dirlist configuration]
.Actual output
image::media/images/admin_handler_dirlist_ex.png[Dirlist example]
[[indexes]]
Indexes
~~~~~~~
This is the behavior inherited from the
link:modules_handlers_dirlist.html[dirlist/Only listing] handler.
Simply enable the desired file attributes to be shown under `Listing`,
and choose the HTML template to use (`default` -with the Cherokee logo-,
`plain` -a fixed width theme- and `firefox3`).
You can also include a `Notice file` to show its contents on top of
every automatically generated list.
Of course, the lists are sortable by any of the displayed attributes.