version 1.10, 2004/11/23 02:19:16 |
version 1.12, 2004/12/29 01:42:13 |
|
|
% $OpenXM: OpenXM/src/kan96xx/Doc/cgi.sm1,v 1.9 2004/11/23 01:37:47 takayama Exp $ |
% $OpenXM: OpenXM/src/kan96xx/Doc/cgi.sm1,v 1.11 2004/11/23 02:38:46 takayama Exp $ |
% OpenXM/src/polymake/cgi/cgi-polymake.sh |
% OpenXM/src/polymake/cgi/cgi-polymake.sh |
% is a shell script to call sm1/polymake as a CGI script. |
% is a shell script to call sm1/polymake as a CGI script. |
% Override as /doPolymake {doPolymake.OoHG} def if you need. |
% Override as /doPolymake {doPolymake.OoHG} def if you need. |
|
|
[[(URL),(/index.html)] |
[[(URL),(/index.html)] |
] /kv set |
] /kv set |
[(cgiKeyValuePairToUrlEncodingString) kv] extension /sss set |
[(cgiKeyValuePairToUrlEncodingString) kv] extension /sss set |
[(GET ) , sss , ( HTTP/0.9) , nl , nl ] cat /sss2 set |
% [(GET ) , sss , ( HTTP/0.9) , nl , nl ] cat /sss2 set |
|
[(GET ) , sss , ( HTTP/0.9) , nl , |
|
(HOST: ) , url , nl |
|
nl ] cat /sss2 set |
|
|
sss2 message |
sss2 message |
[(sm1.socket) (connect) [80 url]] extension 0 get /goo set |
[(sm1.socket) (connect) [80 url]] extension 0 get /goo set |
|
|
] /ff set |
] /ff set |
[(cgiKeyValuePairToUrlEncodingString) ff] extension /ff set |
[(cgiKeyValuePairToUrlEncodingString) ff] extension /ff set |
[(POST ) , ff1 , ( HTTP/0.9) , nl , |
[(POST ) , ff1 , ( HTTP/0.9) , nl , |
(Connection: Keep-Alive) , nl , |
% (Connection: Keep-Alive) , nl , |
(Content-length: ) , ff length (string) dc , nl , |
(HOST: ) cgiQueryPolymake.hostname , nl , |
ff ] cat /sss2 set |
(Content-length: ) , ff length (dollar) dc , nl , nl |
|
ff nl] cat /sss2 set |
% step 2. Call the server and get the response in pp |
% step 2. Call the server and get the response in pp |
[(sm1.socket) (connect) |
[(sm1.socket) (connect) |
[80 cgiQueryPolymake.hostname]] extension 0 get /goo set |
[80 cgiQueryPolymake.hostname]] extension 0 get /goo set |
|
|
arg1 |
arg1 |
} def |
} def |
|
|
|
/cgi.test1 { |
|
(FACETS) |
|
[(POINTS) nl |
|
(1 0 0 ) nl |
|
(1 1 0 ) nl |
|
(1 0 1 ) nl |
|
] cat |
|
cgiQueryPolymake message |
|
} def |
% Overrides doPolymake |
% Overrides doPolymake |
%/doPolymake { doPolymake.OoHG } def |
%/doPolymake { doPolymake.OoHG } def |
%/polymake.start { polymake.start.OoHG } def |
%/polymake.start { polymake.start.OoHG } def |