1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-07-05 04:28:57 +00:00

Clean up some debug output

This commit is contained in:
dschmenk 2015-02-12 15:23:57 -08:00
parent 970ae32b88
commit 752f6c7bdb

View File

@ -32,7 +32,7 @@ word socketHTTP
byte[65] prefix
byte perr
word filebuff, iobuff
byte hello = "Apple II Web Server"
byte hello = "Apple II Web Server\n"
byte defhtml = "INDEX.HTML"
//
// HTTP response
@ -40,6 +40,7 @@ byte defhtml = "INDEX.HTML"
byte httpOK = "HTTP/1.1 200 OK\n\rContent-Type: text/html\n\rContent-Length: "
byte httpEnd = "\n\r\n\r"
byte httpBAD = "HTTP/1.1 404 NOTFOUND\n\rContent-Type: text/plain\n\rContent-Length: 12\n\r\n\rBad Request\n\r"
byte httpNOFILE = "HTTP/1.1 404 NOTFOUND\n\rContent-Type: text/plain\n\rContent-Length: 24\n\r\n\rError:File not found.\n\r"
//
// ProDOS routines
//
@ -225,12 +226,12 @@ def servHTTP(remip, remport, lclport, data, len, param)
lenstr = itos(@lenstr + 1, filelen) - (@lenstr + 1)
strcat(@okhdr, @httpOK, @lenstr)
strcat(@okhdr, @okhdr, @httpEnd)
dumpchars(@okhdr + 1, okhdr)
//dumpchars(@okhdr + 1, okhdr)
iNet:sendTCP(socketHTTP, @okhdr + 1, okhdr)
sendFile(refnum, socketHTTP, filelen)
close(refnum)
else
iNet:sendTCP(socketHTTP, @httpBAD + 1, httpBAD)
iNet:sendTCP(socketHTTP, @httpNOFILE + 1, httpNOFILE)
fin
return
fin