-- call 'content_type' and 'set_out_header' before starting output
-- optional, default - text/html
content_type('text/html')
set_out_header('X-LSP','Welcome')
if not mutex then mutex=0 end
?>
# This is comment ?>
Hello from luasp
This is firstsecond request
Mutex value: =mutex?>
Session: =env.session?>
Your IP address: =env.remote_ip?>
URI: =env.uri?>
print('Arguments from request line:
')
for i,j in pairs(args) do
print(i..'='..j..'
')
end
?>
curl.timeout(5)
req=curl.open('GET','http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt')
content=req:send()
if req:status()==200 then
echo('')
print(content)
echo('
')
end
content=nil -- optional, this free the memory
?>
reload