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
|
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
|
-
+
-
-
-
+
+
+
+
-
+
+
+
+
+
-
-
-
-
-
-
|
https://wapp.tcl.tk/demo/env.tcl/abc/def/ghi?a=5&b=22.425#point42
\___/ \_________/ \______________________/ \__________/ \_____/
| | | | |
scheme authority path query fragment
Assuming that /demo/env.tcl is the script that implements the application,
tradition CGI and SCGI, and Wapp, break a URL down like this:
traditional CGI and SCGI provide the following breakdown:
>
https://wapp.tcl.tk/demo/env.tcl/abc/def/ghi?a=5&b=22.425#point42
\_________/ \__________/\__________/
| | |
HTTP_HOST SCRIPT_NAME PATH_INFO
\_________/ \__________/\__________/ \__________/
| | | |
HTTP_HOST SCRIPT_NAME PATH_INFO QUERY_STRING
Wapp provides additional variables not found in traditional CGI:
>
>
SELF_URL
______________|___________________
/ \
https://wapp.tcl.tk/demo/env.tcl/abc/def/ghi?a=5&b=22.425#point42
\______________________________/ \_/ \_____/
| | |
BASE_URL PATH_HEAD '-- PATH_TAIL
>
https://wapp.tcl.tk/demo/env.tcl/abc/def/ghi?a=5&b=22.425#point42
\__________________________________/ \__________/
| |
SELF_URL QUERY_STRING
2.0 URL Mapping
---------------
The URL Mapper is the function that determines which routine in the
application should handle an HTTP request based on the URL. In Wapp,
the default URL Mapper simply looks at PATH\_HEAD and invokes the
|