I have Tclhttpd web server wrapped with bones tool on Android.
When browser requests static file from wrapped htdocs directory the following command in proc Httpd_ReturnFile
file copy zipfs_4747e2_2767 sockf998a8d0 -command [list HttpdCopyDone ...]
hangs and HttpdCopyDone is not started
Chrome browser sometimes reports ERR_CONTENT_LENGTH_MISMATCH, no html displayed.
Is "file copy" expected to work with source file in zipfs? - reading from zipfs_... gets uncompressed data - and length information in header is correct
The "-command" option used is not documented at
https://www.tcl.tk/man/tcl8.6/TclCmd/file.htm
A start to get Tclhttpd running on Android is something like this in /assets/app/main.tcl
catch {console show}
set vfsdir /assets/app/htdocs
set webdir ~/htdocs
if {![file exists $webdir]} {
# template files require write access anyway
file copy $vfsdir ~
}
set xdir [file dirname [info script]]
set xdir [file join $xdir bin]
cd $xdir
source httpd.tcl
with directories /assets/app/(htdocs|bin|lib...)