Wapp

Check-in [d52654e48f]
Login

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

Overview
Comment:If the $argv0 variable is not set, use "/" for SCRIPT_FILENAME and DOCUMENT_ROOT. Ticket [1d0112d75bfbffc8].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d52654e48fe239be14fdb516113da7b7e78298fe2e27458e4a13e2144376c67e
User & Date: drh 2019-07-31 14:24:05
Context
2019-07-31
14:30
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 tags: trunk
14:24
If the $argv0 variable is not set, use "/" for SCRIPT_FILENAME and DOCUMENT_ROOT. Ticket [1d0112d75bfbffc8]. check-in: d52654e48f user: drh tags: trunk
2019-07-30
23:12
Serialize the evaluation of the wappInt-handle-request proc. Fix for ticket [207094dd9de1343a] check-in: 80f25418a1 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to wapp.tcl.

472
473
474
475
476
477
478

479



480
481
482
483
484
485
486
      }
      if {[string length [dict get $W .header]]>100000} {
        error "HTTP request header too big - possible DOS attack"
      }
    } elseif {$n==0} {
      # We have reached the blank line that terminates the header.
      global argv0

      set a0 [file normalize $argv0]



      dict set W SCRIPT_FILENAME $a0
      dict set W DOCUMENT_ROOT [file dir $a0]
      if {[wappInt-parse-header $chan]} {
        catch {close $chan}
        return
      }
      set len 0







>
|
>
>
>







472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
      }
      if {[string length [dict get $W .header]]>100000} {
        error "HTTP request header too big - possible DOS attack"
      }
    } elseif {$n==0} {
      # We have reached the blank line that terminates the header.
      global argv0
      if {[info exists ::argv0]} {
        set a0 [file normalize $argv0]
      } else {
        set a0 /
      }
      dict set W SCRIPT_FILENAME $a0
      dict set W DOCUMENT_ROOT [file dir $a0]
      if {[wappInt-parse-header $chan]} {
        catch {close $chan}
        return
      }
      set len 0