Wapp

Check-in [d739a6767c]
Login

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

Overview
Comment:Fix documentation for the wapp-param-list command.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d739a6767caddfdf2b99aab998e61d3c9623a3f60c39bc5dd057d910ec810f9e
User & Date: drh 2022-07-27 20:46:34
References
2022-08-01
10:17 Post: commands.md database section (artifact: 73a0daf2d9 user: anonymous)
Context
2022-07-28
12:24
Add the -debug option that causes reply content to go uncompressed. (check-in: e89db24eca user: drh tags: trunk)
2022-07-27
20:46
Fix documentation for the wapp-param-list command. (check-in: d739a6767c user: drh tags: trunk)
2022-02-13
19:39
Adjust the REQUEST_URI query parameter such that it includes the QUERY_STRING if any. In other words, REQUEST_URI should be the second field of the first line of the original HTTP request. This is how Apache and Nginx both work. (check-in: 3028f8c9ea user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to docs/commands.md.










1
2
3
4
5
6
7










Wapp Commands
=============

Wapp is really just a collection of TCL procs. All procs are in a single file
named "wapp.tcl".

The procs that form the public interface for Wapp begin with "wapp-".  The
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
open_database
if {[info exists Q(delacct)] && [info exists Q(acct)]} {
  db eval {SELECT rowid FROM entry WHERE acct=$Q(acct)} break
  if {![info exists rowid]} {
    db eval {
      DELETE FROM account WHERE name=$Q(acct)
    }
  }
  unset Q(acct)
}
Wapp Commands
=============

Wapp is really just a collection of TCL procs. All procs are in a single file
named "wapp.tcl".

The procs that form the public interface for Wapp begin with "wapp-".  The
69
70
71
72
73
74
75
76
77


78
79
80
81
82
83
84
85
86
87
     Change the value of parameter _NAME_ to _VALUE_.  If _NAME_ does not
     currently exist, it is created.

  +  **wapp-param-exists** _NAME_  
     Return true if and only if a parameter called _NAME_ exists for the
     current request.

  +  **wapp-param-list** _NAME_  
     Return a TCL list containing the names of all parameters for the current


     request.  Note that there are several parameters that Wapp uses
     internally.  Those internal-use parameters all have names that begin
     with ".".

  +  <a name='allow-xorigin'></a>**wapp-allow-xorigin-params**  
     Query parameters and POST parameters are usually only parsed and added
     to the set of parameters available to "wapp-param" for same-origin
     requests.  This restriction helps prevent cross-site request forgery
     (CSRF) attacks.  Query-only web pages for which it is safe to accept
     cross-site query parameters can invoke this routine to cause query







|

>
>
|

|







79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
     Change the value of parameter _NAME_ to _VALUE_.  If _NAME_ does not
     currently exist, it is created.

  +  **wapp-param-exists** _NAME_  
     Return true if and only if a parameter called _NAME_ exists for the
     current request.

  +  **wapp-param-list** _GLOB_  
     Return a TCL list containing the names of all parameters for the current
     request.  The _GLOB_ argument is optional.  If provided, only parameters
     that match the GLOB pattern are returned.  If omitted, `*` is used as the
     GLOB pattern.  Note that there are several parameters that Wapp uses
     internally.  Those internal-use parameters all have names that begin
     with ".". 

  +  <a name='allow-xorigin'></a>**wapp-allow-xorigin-params**  
     Query parameters and POST parameters are usually only parsed and added
     to the set of parameters available to "wapp-param" for same-origin
     requests.  This restriction helps prevent cross-site request forgery
     (CSRF) attacks.  Query-only web pages for which it is safe to accept
     cross-site query parameters can invoke this routine to cause query