Created
May 21, 2017 20:10
-
-
Save rgchris/0eb5772dafa7e5c8fb77f5c24edbf236 to your computer and use it in GitHub Desktop.
Possible implementation of CGI with Ren-C HTTPD module.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/ren-c | |
Rebol [ | |
Title: "CGI Tester" | |
Date: 21-May-2017 | |
Author: "Christopher Ross-Gill" | |
] | |
import <httpd> | |
ws: open [ | |
scheme: 'httpd 8080 [ | |
probe request/action | |
set-env "PATH_INFO" request/action | |
; ... SET-ENV other CGI variables ... | |
response/type: "text/plain" | |
call/output "./cgi-test-script.r" response/content: make string! 0 | |
] | |
] | |
wait ws |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment