Wapp

Check-in [2eac47dda7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Documentation updates: improvements to the description of URL mapping and CGI variables.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 2eac47dda7d58fe2b19640ddc753131ae27cb65a577fefe9e3207bcb8a5be295
User & Date: drh 2019-03-07 13:34:03
Context
2019-03-07
14:37
Further documentation refinements. check-in: 271766c541 user: drh tags: trunk
13:34
Documentation updates: improvements to the description of URL mapping and CGI variables. check-in: 2eac47dda7 user: drh tags: trunk
2019-03-06
23:12
More documentation tweaks. check-in: 7be9077b84 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to docs/urlmapping.md.

    10     10       https://wapp.tcl.tk/demo/env.tcl/abc/def/ghi?a=5&b=22.425#point42
    11     11       \___/   \_________/ \______________________/ \__________/ \_____/
    12     12         |          |              |                     |          |
    13     13       scheme   authority        path                  query      fragment
    14     14   
    15     15   
    16     16   Assuming that /demo/env.tcl is the script that implements the application,
    17         -tradition CGI and SCGI, and Wapp, break a URL down like this:
           17  +traditional CGI and SCGI provide the following breakdown:
    18     18   
    19     19   >
    20     20       https://wapp.tcl.tk/demo/env.tcl/abc/def/ghi?a=5&b=22.425#point42
    21         -            \_________/ \__________/\__________/
    22         -                 |           |          |
    23         -             HTTP_HOST  SCRIPT_NAME  PATH_INFO
           21  +            \_________/ \__________/\__________/ \__________/
           22  +                 |           |          |             |
           23  +             HTTP_HOST  SCRIPT_NAME  PATH_INFO   QUERY_STRING
           24  +
           25  +Wapp provides additional variables not found in traditional CGI:
    24     26   
    25     27   >
           28  +                SELF_URL
           29  +     ______________|___________________
           30  +    /                                  \
    26     31       https://wapp.tcl.tk/demo/env.tcl/abc/def/ghi?a=5&b=22.425#point42
    27     32       \______________________________/ \_/ \_____/
    28     33                      |                  |     |
    29     34                   BASE_URL         PATH_HEAD  '-- PATH_TAIL     
    30     35   
    31         ->
    32         -    https://wapp.tcl.tk/demo/env.tcl/abc/def/ghi?a=5&b=22.425#point42
    33         -    \__________________________________/         \__________/
    34         -                   |                                  |
    35         -                SELF_URL                         QUERY_STRING
    36         -
    37     36   
    38     37   2.0 URL Mapping
    39     38   ---------------
    40     39   
    41     40   The URL Mapper is the function that determines which routine in the
    42     41   application should handle an HTTP request based on the URL.  In Wapp,
    43     42   the default URL Mapper simply looks at PATH\_HEAD and invokes the