xapCacheWebserverApplet script error?

2 replies [Last post]
garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011

Brett,

 

I have only recently started to make use of the webserver applet in anger and have noticed it crashes plugboard every now and there at seeming random intervals of uptime.

 

The log shows this to be related to this bit of code:

 

function sendError( client, status, str )
    message = "HTTP/1.0 " .. status .. " OK\r\n" ;
    message = message .. "Server:  xapCacheApplet" .. socket.version .. "\r\n";

error message is: attempt to concatenate field 'version' ( a nil value)

 

should this be info.version as used elsewhere in the code?

 

thanks

Garry.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Quite right

Gary you are correct it should be info.version my bad.  Well spotted.

Brett

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
On more issue

Applet worked great in a number of browsers including iPhone iOS4. Have recently upgraded to iOS5 and it didn't work?! Have pinpointed this to this bit of code    local message = "HTTP/1.0 200/OK\r\n"    message = message .. "Server: xapCacheWebserverApplet" .. info.version .. "\r\n";    message = message .. "Content-Type: text/html\r\n"    message = message .. "Connection: close\r\n\r\n" I think the forward slash after 200 needs to be removed. At least this works for me. Cheers Garry

Hardware Info