summaryrefslogtreecommitdiff
path: root/http.tcl
diff options
context:
space:
mode:
authoralekseiplusplus <alekseijeaves@protonmail.com>2024-06-30 21:57:33 +1000
committeralekseiplusplus <alekseijeaves@protonmail.com>2024-06-30 21:57:33 +1000
commita3bdaf37b72013fe581f108c4798137e1ea267cd (patch)
tree5200d85e5b923499a7c93ba5e4278613f3c053cf /http.tcl
parentd5cc926ec6c3020d2d51cacc7d14e59c558c4167 (diff)
last commit of today; expanding on configuration and modulesHEADmaster
Diffstat (limited to 'http.tcl')
-rwxr-xr-xhttp.tcl10
1 files changed, 5 insertions, 5 deletions
diff --git a/http.tcl b/http.tcl
index 3995c80..7dc6dbb 100755
--- a/http.tcl
+++ b/http.tcl
@@ -40,8 +40,8 @@ namespace eval http {
]
proc server {channel address port} {
- variable hook_namespace;
- variable srv;
+ #variable hook_namespace;
+ #variable srv;
## (1) Handle first line
puts "(1)"
@@ -51,6 +51,7 @@ namespace eval http {
## (2) Get rest of packet.
set packet {}
+
while { [gets $channel line] } {
puts $line
## Check if field-line is in correct form.
@@ -80,7 +81,7 @@ namespace eval http {
## (3) Find if the file exists, or there is a hooked application.
# If file exists, then 200 OK!
- set filename [string cat $srv [request_target::file $request_target]]
+ set filename [string cat $configure::srv [request_target::file $request_target]]
if [expr [file exists $filename] && [file isfile $filename]] {
respond $channel 200 $filename
} elseif [expr [file exists [string cat $filename "index.html"]] && [file isfile [string cat $filename "index.html"]]] {
@@ -121,9 +122,8 @@ namespace eval http {
proc respond {channel status {optional {}}} {
## Import Variables
- variable srv;
variable status_codes;
- variable hook_namespace;
+
## New Variables
variable content {};
variable response {};