Unix & Shell-Programmierung: Die POST Methode |
...> telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
POST /cgi-bin/test.cgi HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 19
VAR1=123&VAR2=xyz
HTTP/1.1 200 OK Date: Thu, 23 Nov 2000 12:48:26 GMT Server: Apache/1.3.12 ... Connection: close Content-Type: text/plain the pure query string VAR1=123&VAR2=xyz the cgi arguments VAR1 = "123" VAR2 = "xyz" the global tcl variable cgi_argl={VAR1 123} {VAR2 xyz} the script name argv0='/usr/local/httpd/cgi-bin/test.cgi' the list of arguments argv = '' the working directory cwd='/usr/local/httpd/cgi-bin' the environment env(CONTENT_LENGTH) = 19 env(CONTENT_TYPE) = application/x-www-form-urlencoded env(DOCUMENT_ROOT) = /usr/local/httpd/htdocs env(GATEWAY_INTERFACE) = CGI/1.1 env(HOSTNAME) = si env(HOSTTYPE) = i386 env(HTTP_CONNECTION) = Keep-Alive env(MACHTYPE) = i386-suse-linux env(OSTYPE) = linux env(PATH) = /sbin:/bin:/usr/sbin:/usr/bin env(PWD) = /usr/local/httpd/cgi-bin env(QUERY_STRING) = env(REMOTE_ADDR) = 127.0.0.1 env(REMOTE_PORT) = 2758 env(REQUEST_METHOD) = POST env(REQUEST_URI) = /cgi-bin/test.cgi env(SCRIPT_FILENAME) = /usr/local/httpd/cgi-bin/test.cgi env(SCRIPT_NAME) = /cgi-bin/test.cgi env(SERVER_ADDR) = 127.0.0.1 env(SERVER_ADMIN) = root@localhost env(SERVER_NAME) = si.fh-wedel.de env(SERVER_PORT) = 80 env(SERVER_PROTOCOL) = HTTP/1.0 env(SERVER_SIGNATURE) = ... env(SERVER_SOFTWARE) = Apache/1.3.12 ... env(UNIQUE_ID) = Oh0SGsMlVDYAAAHDEAo Connection closed by foreign host.
...>
post1.exp: das expect-Skript für dieses Beispiel |
Letzte Änderung: 14.02.2012 | © Prof. Dr. Uwe Schmidt |