HTTP
HTTP POST
--libcurl
# Server-side
HTTP/1.1 200 OK
Date: Thu, 29 Jul 2008 14:49:00 GMT
Server: test-server/fake
Content-Length: 0
Content-Type: text/plain
Connection: close
# Client-side
http
--libcurl for POST with binary content
SSL_CERT_FILE
http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl %LOGDIR/test%TESTNUMBER.c --data-binary @%LOGDIR/%TESTNUMBER-upload
# "ab\x81""cd\0e\\\"?\r\n\t\x01""fghi%x1Ajklm%xFD"
%hex[ab%81cd%00e\"?%0D%0A%09%01fghi%1Ajklm%FD]hex%
--libcurl
# Verify data after the test has been "shot"
POST /we/want/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
Content-Length: 24
Content-Type: application/x-www-form-urlencoded
%hex[ab%81cd%00e\"?%0D%0A%09%01fghi%1Ajklm%FD]hex%
# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
# configurations - just ignore them
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
$_ = '' if /CURLOPT_SSLVERSION/
$_ = '' if /CURLOPT_TIMEOUT_MS/
%includetext %SRCDIR/data/data%TESTNUMBER.c%