Skip to content

slitvinov/cgi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A setup to run CGI scripts.

$ python3 -m http.server --cgi &

open in a browser http:https://localhost:8000/cgi-bin/awk.cgi

$ (cd cgi-bin && make)
c99 -O2 -g cat.c -o cat.cgi
c99 -O2 -g c.c -o c.cgi
c99 -O2 -g error.c -o error.cgi
c99 -O2 -g vars.c -o vars.cgi

open http:https://localhost:8000/cgi-bin/vars.cgi

$ curl --data-binary @README.md -X POST -s http:https://localhost:8000/cgi-bin/vars.cgi
$ curl --data-binary @README.md -H 'Content-Type: text/markdown' -X POST -s http:https://localhost:8000/cgi-bin/vars.cgi