-
Notifications
You must be signed in to change notification settings - Fork 2
/
rscript.r
23 lines (22 loc) · 970 Bytes
/
rscript.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
source("api/danode.r")
cat("HTTP/1.1 200 OK\n")
cat("Content-Type: text/html; charset=utf-8\n\n")
cat("<html>")
cat(" <head>")
cat(" <title>DaNode 'user defined' CGI (R) test script</title>")
cat(" <meta name='author' content='Danny Arends'>")
cat(" </head>")
cat(" <body>")
cat(" DaNode 'user defined' CGI (R) test script<br/>")
cat(" <form action='rscript.r' method='post' enctype='multipart/form-data'>")
cat(" <table>")
cat(" <tr><td>Server: </td><td>",toS(SERVER),"</td></tr>")
cat(" <tr><td><a href='rscript.r?test=GET&do'>GET</a>: </td><td>",toS(GET),"</td></tr>")
cat(" <tr><td>POST: </td><td>",toS(POST),"</td></tr>")
cat(" <tr><td>Test: </td><td> <input name='test' type='text'></td></tr>")
cat(" <tr><td>File: </td><td> <input name='file' type='file'></td></tr>")
cat(" <tr><td> </td><td> <input type='submit' value='POST'></td></tr>")
cat(" </table>")
cat(" </form>")
cat(" </body>")
cat("</html>")