version 1.11, 2004/11/23 02:38:46 |
version 1.13, 2013/09/22 01:07:38 |
|
|
% $OpenXM: OpenXM/src/kan96xx/Doc/cgi.sm1,v 1.10 2004/11/23 02:19:16 takayama Exp $ |
% $OpenXM: OpenXM/src/kan96xx/Doc/cgi.sm1,v 1.12 2004/12/29 01:42:13 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 |
|
|
/cgiPolymake.polymakeName (polymake) def |
/cgiPolymake.polymakeName (polymake) def |
%/cgiPolymake.polymakeName (polymake_dummy) def |
%/cgiPolymake.polymakeName (polymake_dummy) def |
%/cgiPolymake.polymakeName (hoge) def |
%/cgiPolymake.polymakeName (hoge) def |
|
/cgiPolymake.log 1 def |
|
|
[(cgiPolymake) |
[(cgiPolymake) |
[(Make sm1 to a polymake server based on CGI/OoHG) |
[(Make sm1 to a polymake server based on CGI/OoHG) |
|
|
cgiPolymake.errorMessage message exit |
cgiPolymake.errorMessage message exit |
} { } ifelse |
} { } ifelse |
[(read) 0 cgi.content_length] extension /cgi.query_string set |
[(read) 0 cgi.content_length] extension /cgi.query_string set |
|
cgiPolymake.log { |
|
cgi.query_string (string) dc sm1log |
|
} { } ifelse |
cgi.query_string isString { |
cgi.query_string isString { |
cgi.query_string length 0 eq { |
cgi.query_string length 0 eq { |
cgiPolymake.errorMessage message exit |
cgiPolymake.errorMessage message exit |
|
|
[(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 , |
|
(HOST: ) cgiQueryPolymake.hostname , nl , |
(Content-length: ) , ff length (dollar) dc , nl , nl |
(Content-length: ) , ff length (dollar) dc , nl , nl |
ff nl] cat /sss2 set |
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 |