598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
|
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
|
-
+
|
}
if {[dict exists $wapp SCRIPT_NAME]} {
dict append wapp BASE_URL [dict get $wapp SCRIPT_NAME]
} else {
dict set wapp SCRIPT_NAME {}
}
if {![dict exists $wapp PATH_INFO]} {
# If PATH_INFO is missing (ex: nginx) the construct it
# If PATH_INFO is missing (ex: nginx) then construct it
set URI [dict get $wapp REQUEST_URI]
set skip [string length [dict get $wapp SCRIPT_NAME]]
dict set wapp PATH_INFO [string range $URI $skip end]
}
if {[regexp {^/([^/]+)(.*)$} [dict get $wapp PATH_INFO] all head tail]} {
dict set wapp PATH_HEAD $head
dict set wapp PATH_TAIL [string trimleft $tail /]
|