Wapp

Check-in [95eb5f5c75]
Login

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

Overview
Comment:Add the wapp-debug-puts-env command for debugging.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 95eb5f5c75043738da42bc573c84be6c465dc63d9ebd76edf37e292737beb8cb
User & Date: drh 2018-01-29 18:08:06.135
Context
2018-01-29
20:54
Add the --trace option useful for debugging. (check-in: 7e098c4180 user: drh tags: trunk)
18:08
Add the wapp-debug-puts-env command for debugging. (check-in: 95eb5f5c75 user: drh tags: trunk)
01:10
Add another ajax form example, this time using x-www-form-urlencoded content. (check-in: 39368df9be user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to wapp.tcl.
231
232
233
234
235
236
237













238
239
240
241
242
243
244
      if {[regexp {^[ \t]*wapp-subst[ \t]+[^\173]} $x]} {
        append res "$p:$ln: unsafe \"wapp-subst\" call: \"[string trim $x]\"\n"
      }
    }
  }
  return $res
}














# Start up the wapp framework.  Parameters are a list passed as the
# single argument.
#
#    -server $PORT         Listen for HTTP requests on this TCP port $PORT
#
#    -scgi $PORT           Listen for SCGI requests on TCP port $PORT







>
>
>
>
>
>
>
>
>
>
>
>
>







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
      if {[regexp {^[ \t]*wapp-subst[ \t]+[^\173]} $x]} {
        append res "$p:$ln: unsafe \"wapp-subst\" call: \"[string trim $x]\"\n"
      }
    }
  }
  return $res
}

# Applications under development can invoke this routine to cause the
# environment for the current request to be written to standard output,
# as a debugging aid.  This routine has no place in a production
# application
#
proc wapp-debug-puts-env {} {
  global wapp
  foreach var [lsort [dict keys $wapp]] {
    if {[string index $var 0]=="."} continue
    puts "$var = [list [dict get $wapp $var]]"
  }
}

# Start up the wapp framework.  Parameters are a list passed as the
# single argument.
#
#    -server $PORT         Listen for HTTP requests on this TCP port $PORT
#
#    -scgi $PORT           Listen for SCGI requests on TCP port $PORT