diff --git a/var/mongoose/cgi-bin/cat.jim b/var/mongoose/cgi-bin/cat.jim index bdc5d53..978051a 100755 --- a/var/mongoose/cgi-bin/cat.jim +++ b/var/mongoose/cgi-bin/cat.jim @@ -2,7 +2,7 @@ package require cgi source /mod/webif/lib/setup -require system.class chunked pretty_size +require system.class pretty_size cgi_input #cgi_dump @@ -10,16 +10,14 @@ cgi_input set file [cgi_get file "-"] if {$file eq "-"} { exit } -start_chunked +httpheader "text/plain" if {![file exists $file]} { - chunk ">>> File $file does not exist.\r\n" + puts ">>> File $file does not exist.\r\n" } else { - chunk ">>> Contents of $file [pretty_size [file size $file]]\r\n" + puts ">>> Contents of $file [pretty_size [file size $file]]\r\n" set fp [open $file r] - chunk [read $fp] + puts [read $fp] close $fp } -end_chunked - diff --git a/var/mongoose/cgi-bin/db.jim b/var/mongoose/cgi-bin/db.jim index 9cfe7ae..86a6ed4 100755 --- a/var/mongoose/cgi-bin/db.jim +++ b/var/mongoose/cgi-bin/db.jim @@ -63,7 +63,7 @@ proc db_info {db_file} { if {$fdb == 0} { puts "Please choose database to view:
"
if { $raw == 0 } {
puts [epg exec dump -raw 1 -service $service -event $event]
- puts "
+ puts "
Click here for extended dump"
} else {
puts [epg exec dumpraw -raw 1 -service $service -event $event]
diff --git a/var/mongoose/cgi-bin/opkg.jim b/var/mongoose/cgi-bin/opkg.jim
index 583f8ef..e3fafec 100755
--- a/var/mongoose/cgi-bin/opkg.jim
+++ b/var/mongoose/cgi-bin/opkg.jim
@@ -2,7 +2,7 @@
package require cgi
source /mod/webif/lib/setup
-require pkg.class chunked
+require pkg.class
cgi_input
#cgi_dump
@@ -10,30 +10,27 @@ cgi_input
set cmd [cgi_get cmd update]
proc opkg {cmd} {
- chunk ">>> opkg $cmd\r\n"
+ puts ">>> opkg $cmd\r\n"
set bcmd "|/mod/webif/lib/bin/opkg $cmd"
set fd [open $bcmd r]
while {[gets $fd line] >= 0} {
- chunk "$line\r\n"
- #chunk_pad
+ puts "$line\r\n"
}
close $fd
- chunk "\r\n"
+ puts "\r\n"
}
-start_chunked
+httpheader "text/plain"
if {$cmd eq "upgrade"} { opkg update }
opkg $cmd
if {$cmd eq "update" || $cmd eq "upgrade"} {
- chunk "Updating package meta information\r\n"
+ puts "Updating package meta information\r\n"
pkg fetchmeta
- chunk "Done.\r\n"
- chunk "Updating diagnostic meta information\r\n"
+ puts "Done.\r\n"
+ puts "Updating diagnostic meta information\r\n"
pkg fetchdiagmeta
- chunk "Done.\r\n"
+ puts "Done.\r\n"
}
-end_chunked
-
diff --git a/var/mongoose/cgi-bin/settings.jim b/var/mongoose/cgi-bin/settings.jim
index 0ac6ae1..e87a9b1 100755
--- a/var/mongoose/cgi-bin/settings.jim
+++ b/var/mongoose/cgi-bin/settings.jim
@@ -52,7 +52,7 @@ set audiomp3 [$settings audiomp3]
# Handle updates
-if {![dict exists $env REQUEST_URI]} { set env(REQUEST_URI) "" }
+if {![dict exists $env SCRIPT_NAME]} { set env(SCRIPT_NAME) "" }
proc _handle_update {class var old text} {
global _cgi
@@ -161,7 +161,7 @@ puts "
puts "
-