Wapp

Check-in [00f66ee5c9]
Login

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

Overview
Comment:Add the capture.tcl test script.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 00f66ee5c98dad1dd6c07aff264e5234fd42abf8fd3a2b320f106ef583488f25
User & Date: drh 2020-10-07 18:24:24.770
Context
2020-10-08
13:02
Add the wapp-before-reply-hook proc. (check-in: f909925b48 user: drh tags: trunk)
2020-10-07
18:24
Add the capture.tcl test script. (check-in: 00f66ee5c9 user: drh tags: trunk)
2020-10-02
19:45
The wapptclsh executable responds to -v and --help. (check-in: 127a98314b user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Added examples/capture.tcl.










































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# This Wapp script records all inbound HTTP requests.  A description
# of each request is stored in -SCRIPT-log.txt where SCRIPT is the base
# name of this script.
#
package require wapp
proc wapp-default {} {
  wapp-allow-xorigin-params
  set msg "------------ New request ---------\n"
  foreach var [lsort [wapp-param-list]] {
    append msg "$var [list [wapp-param $var]]\n"
  }
  set dnam [wapp-param SCRIPT_FILENAME]
  set logfile [file dir $dnam]
  append logfile /-
  append logfile [file root [file tail $dnam]]-log.txt
  set out [open $logfile a]
  puts $out $msg
  close $out
  wapp-trim {<p>Ok</p>}
}
wapp-start $argv