Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
History of file wapp.tcl at check-in cfa2467c17350007
2025-04-09
| ||
16:15 | [019cb67faf] part of check-in [b46ad175c5] Do not allow the content-length to be zero in a redirect. Put in some content, even if it is not used. (check-in: [b46ad175c5] user: drh branch: trunk, size: 32582) | |
2025-04-04
| ||
14:55 | [d5cc2f37f5] part of check-in [98bf94e32b] Enhance the wapp-redirect command so that you can add an optional result code value (ex: 301) to override the default HTTP reply code of 303. (check-in: [98bf94e32b] user: drh branch: trunk, size: 32544) | |
2024-11-22
| ||
16:04 | [67ee06bfe9] part of check-in [3b1ce7c023] Improved error message when unauthorized characters are used in the request URI. (check-in: [3b1ce7c023] user: drh branch: trunk, size: 32531) | |
2024-11-18
| ||
14:47 | [69a6164ebb] part of check-in [e431ca0d00] If there are duplicate query parameters, the value becomes a list that is formed from teh values of the duplicates. Forum post 5eb29da65a. (check-in: [e431ca0d00] user: drh branch: duplicate-parameters, size: 32708) | |
2024-11-07
| ||
13:42 | [73ffeff350] part of check-in [e5fa3551e4] Change the wapp-crash-handler interface so that it takes no arguments. (check-in: [e5fa3551e4] user: drh branch: trunk, size: 32458) | |
2024-11-06
| ||
17:09 | [0033264c37] part of check-in [f7b5b7566a] If a command named "wapp-crash-handler" exists and an application error occurs, invoke the wapp-crash-handler command to generate the error message. (check-in: [f7b5b7566a] user: drh branch: trunk, size: 32473) | |
2024-10-14
| ||
11:16 | [b8f5395a59] part of check-in [2b091c8428] Do not require CRLF endings from clients. (check-in: [2b091c8428] user: drh branch: trunk, size: 32353) | |
2024-10-13
| ||
19:20 | [31929ee969] part of check-in [293f95b663] The line-ending is always a bare U+000a character only. Wapp no longer sends CRLF line endings. (check-in: [293f95b663] user: drh branch: omit-cr, size: 32331) | |
2024-09-29
| ||
22:40 | [73baff4401] part of check-in [199a1a71c1] Fix is so that it runs with Tcl9. (check-in: [199a1a71c1] user: drh branch: trunk, size: 32355) | |
2024-05-19
| ||
22:08 | [98f23b2160] part of check-in [cdac0cdb04] Fix the wapp-content-security-policy command so that it allows newline characters in the security policy input. These are removed before the security policy is added to the header. (check-in: [cdac0cdb04] user: drh branch: trunk, size: 32327) | |
2024-04-15
| ||
10:28 | Renamed and modified wapp.tcl → w3.tcl. [4faf4fbb2c] part of check-in [c0bf5ea896] Rebrand as "W3" (check-in: [c0bf5ea896] user: drh branch: w3, size: 31661) | |
2022-11-10
| ||
11:44 | [72d0d081e3] part of check-in [253fa3bcea] Ignore stderr returns from xdg-open, as suggested by forum post 07078234d6. (check-in: [253fa3bcea] user: drh branch: trunk, size: 32267) | |
2022-07-28
| ||
12:41 | [579960674d] part of check-in [f48c405b79] Fix the wapp-redirect command so that (1) it also does a wapp-reset and (2) so that it uses reply code 303 instead of 307, thus making it usable for redirect-after-POST. (check-in: [f48c405b79] user: drh branch: trunk, size: 32253) | |
12:24 | [bc1aecfc4f] part of check-in [e89db24eca] Add the -debug option that causes reply content to go uncompressed. (check-in: [e89db24eca] user: drh branch: trunk, size: 32240) | |
2022-02-13
| ||
19:39 | [c4e242b5d4] part of check-in [3028f8c9ea] 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 branch: trunk, size: 31993) | |
2021-11-26
| ||
12:23 | [ea7b1c6c92] part of check-in [27c4c3a75e] Require that all POST parameters have lower-case alphanumeric names. Ignore any POST parameter that have upper-case letters or special characters in their names. See forum post 5220ee9ac0. (check-in: [27c4c3a75e] user: drh branch: trunk, size: 32179) | |
2021-09-15
| ||
12:04 | [18c1387540] part of check-in [a757b342da] In this branch is a proposed patch whereby if the page handler calls "wapp-reply-code ABORT" then the request is cancelled and the TCP/IP connection is closed without sending any reply at all. (check-in: [a757b342da] user: drh branch: abort-request, size: 32071) | |
2021-06-18
| ||
13:33 | [ee9212c1a7] part of check-in [d776a1b60b] Further rebustness in the %qp and %url substitutions. This is a correction to the previous check-in. (check-in: [d776a1b60b] user: drh branch: trunk, size: 31889) | |
13:09 | [d09331cba4] part of check-in [edd8b4f267] Fix a problem with backslashes in the %qp() and %url() encoders. See https://sqlite.org/forum/forumpost/8fb639b5ad for the original report. (check-in: [edd8b4f267] user: drh branch: trunk, size: 31879) | |
2020-10-08
| ||
13:02 | [6d031ed49a] part of check-in [f909925b48] Add the wapp-before-reply-hook proc. (check-in: [f909925b48] user: drh branch: trunk, size: 31881) | |
2019-08-01
| ||
16:46 | [b17444183a] part of check-in [68331516e9] Load all environment variables that start with an upper-case ASCII letter as wapp-param values in CGI mode, rather than only loading selected variables. (check-in: [68331516e9] user: drh branch: trunk, size: 31464) | |
2019-07-31
| ||
14:30 | [03967457df] part of check-in [44f07d8804] Fix to [80f25418a1c32b8d] so that it works as CGI again. Also omit a parameter to wappInt-handle-request that is no longer used. (check-in: [44f07d8804] user: drh branch: trunk, size: 31836) | |
14:24 | [0661dca85d] part of check-in [d52654e48f] If the $argv0 variable is not set, use "/" for SCRIPT_FILENAME and DOCUMENT_ROOT. Ticket [1d0112d75bfbffc8]. (check-in: [d52654e48f] user: drh branch: trunk, size: 31869) | |
2019-07-30
| ||
23:12 | [4143061b16] part of check-in [80f25418a1] Serialize the evaluation of the wappInt-handle-request proc. Fix for ticket [207094dd9de1343a] (check-in: [80f25418a1] user: drh branch: trunk, size: 31792) | |
15:34 | [0ce3c8745c] part of check-in [359e3e19e9] Use "info command" instead of "info proc". Ticket [88807f83a6d9ddfd] (check-in: [359e3e19e9] user: drh branch: trunk, size: 30675) | |
2019-04-10
| ||
15:22 | [07ca194ddf] part of check-in [4b187296d9] Improved JSON string literal encoding. (check-in: [4b187296d9] user: drh branch: trunk, size: 30670) | |
2019-04-08
| ||
20:14 | [23ea3d0e16] part of check-in [6385090072] For the %string() substitution, encode newlines and carriage returns using backslash escapes. (check-in: [6385090072] user: drh branch: trunk, size: 30262) | |
2019-04-01
| ||
00:53 | [b440cd8cf5] part of check-in [fb5eafae32] Improved SCGI security: (1) The --scgi option only listens on IP address 127.0.0.1. The new --remote-scgi option must be used if the webserver is on a different machine. (2) The new --fromip option can be used to restrict incoming requests to a particular IP address. (3) In SCGI mode, the new parameter "SERVER_ADDR" contains the IP address of the webserver that originated the SCGI request. (check-in: [fb5eafae32] user: drh branch: trunk, size: 30248) | |
2019-03-06
| ||
20:47 | [ad079c2717] part of check-in [df36e56f70] Use the -command argument to regexp to provide wapp-subst and wapp-trim that are fast and that avoid doing command substitution outside of quoted regions. (check-in: [df36e56f70] user: drh branch: trunk, size: 29090) | |
19:32 | [8df152630f] part of check-in [627a5a8bbc] Alternative implementation of wapp-subst that does not allow command substitution within unquoted sections. (check-in: [627a5a8bbc] user: drh branch: new-subst-algorithm, size: 28567) | |
2019-03-04
| ||
19:18 | [ae1503e99b] part of check-in [cfa2467c17] Fix the multipart/form-data parser so that it can accept none-file uploads. Add the "fileupload.tcl" example. (check-in: [cfa2467c17] user: drh branch: trunk, size: 28304) | |
2019-02-16
| ||
00:26 | [e62a045733] part of check-in [102ae00863] Add the -nowait option to the wapp-start proc. (check-in: [102ae00863] user: drh branch: trunk, size: 28180) | |
2018-08-06
| ||
11:48 | [e6e7d32603] part of check-in [f914bf8729] Avoid an extra \n at the end of the content in an CGI reply. Fix suggested by Gerome Fournier (check-in: [f914bf8729] user: drh branch: trunk, size: 27949) | |
2018-05-31
| ||
19:57 | [d9052ea4e3] part of check-in [6fdf62dd60] Fix a comment typo. (check-in: [6fdf62dd60] user: drh branch: trunk, size: 27938) | |
2018-05-01
| ||
21:03 | [6ac881d9ed] part of check-in [9ca390e69f] Add a "package require Tcl 8.6", suggested by AKU. (check-in: [9ca390e69f] user: drh branch: trunk, size: 27937) | |
2018-03-09
| ||
17:49 | [4737e5460e] part of check-in [1e5ec777a7] Improve %string() to escape < so that </script> does not cause problems in embedded javascript. Improve %html() to escape " and \ to avoid problems with HTML used inside a javascript string. (check-in: [1e5ec777a7] user: drh branch: trunk, size: 27913) | |
2018-02-19
| ||
12:32 | [c2b62dcb20] part of check-in [9352328572] Attempt to reimplement wapp-subst and wapp-trim using the -command option to regsub. This prevents bracket-command evaluatation in unsubstituted script, but it does not handle backslash escapes quite right. (check-in: [9352328572] user: drh branch: regsub-command, size: 28506) | |
2018-02-18
| ||
23:45 | [d173621dc5] part of check-in [a3a740ad51] Allow "%html%(...)%" as an alternative to "%html(...)" for use in cases where the "..." contains one or more ")" characters. (check-in: [a3a740ad51] user: drh branch: trunk, size: 27720) | |
2018-02-16
| ||
19:24 | [0bba28e894] part of check-in [99b13e374c] In "local" and "server" modes, if a TCL error occurs in the page processing routine, write that error onto standard output in addition to sending it back as the reply to request. (check-in: [99b13e374c] user: drh branch: trunk, size: 27357) | |
2018-02-07
| ||
20:00 | [b60a06f941] part of check-in [8b769e4771] Improvements to the same-origin detection logic. (check-in: [8b769e4771] user: drh branch: trunk, size: 27239) | |
2018-02-06
| ||
17:58 | [01a5c831b3] part of check-in [6cd6484c92] Fix filename dequoting in multipart/form-data interpretation. Add two test files for multipart/form-data testing. (check-in: [6cd6484c92] user: drh branch: trunk, size: 27179) | |
16:54 | [b58638ad37] part of check-in [4cc53a980a] Adjust the regexp commands used to parse multipart/form-data to improved performance with very large upload files. (check-in: [4cc53a980a] user: drh branch: trunk, size: 27129) | |
15:47 | [8cf113f8a6] part of check-in [70438dc56d] Add support for decoding multipart/form-data on POST queries. (check-in: [70438dc56d] user: drh branch: trunk, size: 27067) | |
13:14 | [fd019256f4] part of check-in [7700f1866a] Add the WAPP_MODE cgi parameter. (check-in: [7700f1866a] user: drh branch: trunk, size: 26555) | |
12:46 | [b74aed45ef] part of check-in [a931abfc06] Add the "--local PORT" option to wapp-start. (check-in: [a931abfc06] user: drh branch: trunk, size: 26183) | |
12:37 | [63a2197e7a] part of check-in [bacdb61533] Move the implementation of wapp-start to the end of the file, where it seems to fit in better. No changes to logic. (check-in: [bacdb61533] user: drh branch: trunk, size: 26008) | |
2018-02-05
| ||
01:31 | [9c8c28451b] part of check-in [95e6f7d2d2] Fix automatic CGI detection so that it works with CGI 1.1. (check-in: [95e6f7d2d2] user: drh branch: trunk, size: 26008) | |
00:45 | [c226cd786a] part of check-in [20f4274937] Make sure the SCRIPT_FILENAME is a full pathname for the standalone server. (check-in: [20f4274937] user: drh branch: trunk, size: 25996) | |
2018-02-04
| ||
23:38 | [2ffee8b0e2] part of check-in [4c985fa7e4] Add the (pwd)= output line to wapp-debug-env. (check-in: [4c985fa7e4] user: drh branch: trunk, size: 25965) | |
19:49 | [deca059d5a] part of check-in [bccd3dd07f] Make CGI parameters DOCUMENT_ROOT and SCRIPT_FILENAME available to the application. (check-in: [bccd3dd07f] user: drh branch: trunk, size: 25925) | |
2018-02-02
| ||
16:03 | [5986fe3a11] part of check-in [d45c7180be] Remove deprecated interfaces. Improved comments in the wapp.tcl source code. (check-in: [d45c7180be] user: drh branch: trunk, size: 25779) | |
01:02 | [b7a35bf3c4] part of check-in [3a5f24fc30] Faster dispatch using "info procs" rather than "info commands". (check-in: [3a5f24fc30] user: drh branch: trunk, size: 25936) | |
2018-02-01
| ||
22:07 | [1e43e93987] part of check-in [7c173f40cb] Move test files into the tests/ folder. Add the encode-binary-file.tcl utility script. Add an image to tests/test01.tcl. Move the "-translation binary" out of wappInt-handle-request and into wappInt-handle-cgi-request. (check-in: [7c173f40cb] user: drh branch: trunk, size: 25961) | |
21:19 | [7159053079] part of check-in [098049fe94] Always set "-translation binary" on an http reply. Add an icon to the shoplist.tcl example application. (check-in: [098049fe94] user: drh branch: trunk, size: 25960) | |
03:11 | [489eb6684f] part of check-in [15fbf713e6] Safety enhancements: (A) Invoke the application with the --lint option to do a self-check for unsafe constructs. (B) Bring back the wapp-unsafe command for the rare cases where it is actually needed. (C) Comment out wapp.tcl comment lines when building the wapptclsh application. (check-in: [15fbf713e6] user: drh branch: trunk, size: 25966) | |
2018-01-31
| ||
01:09 | [2c530de5f7] part of check-in [9aa39ada4d] Get automatic compression working for CGI. (check-in: [9aa39ada4d] user: drh branch: trunk, size: 25147) | |
00:19 | [cacd775ed0] part of check-in [4022bf292d] Add a restrictive default Content Security Policy and provide the wapp-content-security-policy command to change it if necessary. (check-in: [4022bf292d] user: drh branch: trunk, size: 25116) | |
2018-01-30
| ||
23:46 | [ef22f3f3a6] part of check-in [e82121be4d] Add wapp-allow-xorigin-params and SAME_ORIGIN. Update the documentation accordingly. (check-in: [e82121be4d] user: drh branch: trunk, size: 24543) | |
19:09 | [b651e0470d] part of check-in [d8cc844e83] Use 307 instead of 302 to redirect. (check-in: [d8cc844e83] user: drh branch: trunk, size: 23078) | |
19:07 | [9514a10391] part of check-in [f9a0146ed6] Add routines wapp-set-param, wapp-param-exists, and wapp-param-list which together eliminate the need to access the global ::wapp dict. (check-in: [f9a0146ed6] user: drh branch: trunk, size: 23075) | |
17:28 | [e19d86f2dd] part of check-in [6fa89b7c98] Support the -Dvariable=value option to set global TCL variables. (check-in: [6fa89b7c98] user: drh branch: trunk, size: 22617) | |
17:06 | [3e70183bdd] part of check-in [bf65f413cf] Change wapp-debug-puts-env to just wapp-debug-env. (check-in: [bf65f413cf] user: drh branch: trunk, size: 22502) | |
16:09 | [fd66b108b9] part of check-in [622563732a] Pass the HTTPS CGI parameter through to the application code. (check-in: [622563732a] user: drh branch: trunk, size: 22581) | |
13:18 | [bd160383d6] part of check-in [51541ac197] Automatically do gzip content-encoding on text/* replies if the TCL interpreter supports the zlib command. (check-in: [51541ac197] user: drh branch: trunk, size: 22571) | |
2018-01-29
| ||
23:42 | [1a4865fb9d] part of check-in [142baa4cbd] Comment changes. Code is unaltered. (check-in: [142baa4cbd] user: drh branch: trunk, size: 22288) | |
21:55 | [5bf34392a2] part of check-in [815db10773] Add wapp-cache-control. (check-in: [815db10773] user: drh branch: trunk, size: 22053) | |
20:54 | [7a5c1ade38] part of check-in [7e098c4180] Add the --trace option useful for debugging. (check-in: [7e098c4180] user: drh branch: trunk, size: 21778) | |
18:08 | [dfbfc3ffd4] part of check-in [95eb5f5c75] Add the wapp-debug-puts-env command for debugging. (check-in: [95eb5f5c75] user: drh branch: trunk, size: 21395) | |
2018-01-28
| ||
20:04 | [2a735de736] part of check-in [ba9c27b26a] Add the wapp-trim command. (check-in: [ba9c27b26a] user: drh branch: trunk, size: 20987) | |
19:46 | [d26165bf08] part of check-in [1b25f9e6ed] Add a Makefile for MacOS. Add wapp-param. Add the %string(...) substitution for wapp-subst. (check-in: [1b25f9e6ed] user: drh branch: trunk, size: 20643) | |
17:45 | [1df660a350] part of check-in [b76fa41ae9] When the value of a cookie is an empty string, set its max age to 1 second so that it will be cleared from the browser. (check-in: [b76fa41ae9] user: drh branch: trunk, size: 20221) | |
17:32 | [d6d909bf19] part of check-in [e6c6f398a0] Add the wapp-redirect command. (check-in: [e6c6f398a0] user: drh branch: trunk, size: 20095) | |
2018-01-27
| ||
16:09 | [f6cb6fafb0] part of check-in [e605df67a3] Add the optional wapp-before-dispatch-hook and the test05.tcl test case to demonstrate how to use it. (check-in: [e605df67a3] user: drh branch: trunk, size: 19598) | |
2018-01-08
| ||
23:19 | [f11a236c18] part of check-in [0c4fbdfef0] Do not throw errors when the HTTP client closes the connections without sending a request. (check-in: [0c4fbdfef0] user: drh branch: trunk, size: 19346) | |
23:02 | [0e8b2953d4] part of check-in [c2a8732d7f] Do not try to translate binary HTTP replies into UTF-8 as is done for text replies. (check-in: [c2a8732d7f] user: drh branch: trunk, size: 19313) | |
2017-12-16
| ||
17:57 | [de1bd6351e] part of check-in [908c2891cf] Improved wappInt-enc-url that works with unicode. Added %qp and %unsafe subtitutions in wapp-subst. Updated the documentation accordingly. (check-in: [908c2891cf] user: drh branch: trunk, size: 19134) | |
03:10 | [b8864d3956] part of check-in [b304d05bf0] Add the wapp-subst command, with documentation and tests. (check-in: [b304d05bf0] user: drh branch: trunk, size: 19454) | |
2017-12-13
| ||
15:25 | [07ae6006af] part of check-in [97b3ea1716] Add a "package provide" to the main script. Further documentation updates. (check-in: [97b3ea1716] user: drh branch: trunk, size: 18517) | |
15:09 | [e8ffa692ce] part of check-in [788f9d0118] SCGI processing now working on Nginx. (check-in: [788f9d0118] user: drh branch: trunk, size: 18467) | |
13:00 | [8c338710d6] part of check-in [69cae4edc3] Refactor the command-line argument. Update documentation accordingly. (check-in: [69cae4edc3] user: drh branch: trunk, size: 16121) | |
12:32 | [649e2a8030] part of check-in [820bdf0f00] Add the CGI test script and fix auto-detection of CGI. (check-in: [820bdf0f00] user: drh branch: trunk, size: 15809) | |
12:30 | [1eb8dcf157] part of check-in [d637e1ba1d] CGI mode is now working. (check-in: [d637e1ba1d] user: drh branch: trunk, size: 15796) | |
12:10 | [fea55d875d] part of check-in [9697edc9ed] Refactor for CGI support. The CGI support is still untested. (check-in: [9697edc9ed] user: drh branch: trunk, size: 15662) | |
2017-12-12
| ||
23:07 | [b5d2a64e04] part of check-in [a7df1f0237] Improvements to option parsing in wapp-start. (check-in: [a7df1f0237] user: drh branch: trunk, size: 13526) | |
22:54 | [b9f6b1e225] part of check-in [f895ab0afe] Get the "--mode server" and --port options working. (check-in: [f895ab0afe] user: drh branch: trunk, size: 13283) | |
21:47 | [adf94107de] part of check-in [25694074dc] Documentation improvements. Better CGI variables. Defense against CSRF attacks. (check-in: [25694074dc] user: drh branch: trunk, size: 13122) | |
21:21 | [37a455acdf] part of check-in [08c08d74fe] Improved detection of HTML injections. Show application errors as a 500 return and include errorInfo in the reply text. (check-in: [08c08d74fe] user: drh branch: trunk, size: 12675) | |
19:54 | [ed007deb98] part of check-in [d7595a18c5] Get it working on Windows. (check-in: [d7595a18c5] user: drh branch: trunk, size: 12359) | |
18:34 | [2613495581] part of check-in [f79255b218] Add support for setting cookies. (check-in: [f79255b218] user: drh branch: trunk, size: 12359) | |
17:11 | [155f54dc68] part of check-in [618c0da329] Improvements to wapp-safety-check. (check-in: [618c0da329] user: drh branch: trunk, size: 9756) | |
16:40 | [0375d6bb34] part of check-in [4d37658588] Decode POST data in the application/x-www-form-urlencoded format. (check-in: [4d37658588] user: drh branch: trunk, size: 9281) | |
16:15 | [d6752a9691] part of check-in [b60ef9d35e] Parse query parameter. (check-in: [b60ef9d35e] user: drh branch: trunk, size: 8838) | |
15:29 | [09316e4e83] part of check-in [36246a7230] Basic functionality. (check-in: [36246a7230] user: drh branch: trunk, size: 7689) | |
12:05 | Added: [5d12d29763] part of check-in [08d1ee28d9] Initial design sketch for Wapp (check-in: [08d1ee28d9] user: drh branch: trunk, size: 4322) | |