aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-05-17 13:56:35 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-05-21 20:05:05 +0200
commitc1c27625c797cfb7b21128484b4990446c1e92d9 (patch)
tree7a1e6b2597a10628f7787e16bb850adb09a87fc7 /tests
parent6876ccf90b473480998af4619de5f316fbd63084 (diff)
curl: show headers in bold
The feature is only enabled if the output is believed to be a tty. -J: There's some minor differences and improvements in -J handling, as now J should work with -i and it actually creates a file first using the initial name and then *renames* that to the one found in Content-Disposition (if any). -i: only shows headers for HTTP transfers now (as documented). Previously it would also show for pieces of the transfer that were HTTP (for example when doing FTP over a HTTP proxy). -i: now shows trailers as well. Previously they were not shown at all. --libcurl: the CURLOPT_HEADER is no longer set, as the header output is now done in the header callback.
Diffstat (limited to 'tests')
-rw-r--r--tests/data/test11162
-rw-r--r--tests/data/test13193
-rw-r--r--tests/data/test13213
-rw-r--r--tests/data/test14001
-rw-r--r--tests/data/test14011
-rw-r--r--tests/data/test14021
-rw-r--r--tests/data/test14031
-rw-r--r--tests/data/test14041
-rw-r--r--tests/data/test14051
-rw-r--r--tests/data/test14061
-rw-r--r--tests/data/test14071
-rw-r--r--tests/data/test14171
-rw-r--r--tests/data/test14201
-rw-r--r--tests/data/test20104
-rw-r--r--tests/data/test2661
15 files changed, 6 insertions, 17 deletions
diff --git a/tests/data/test1116 b/tests/data/test1116
index a9af3e61b..b72cbd60e 100644
--- a/tests/data/test1116
+++ b/tests/data/test1116
@@ -34,6 +34,8 @@ Transfer-Encoding: chunked
Connection: mooo
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccc
+chunky-trailer: header data
+another-header: yes
</datacheck>
</reply>
diff --git a/tests/data/test1319 b/tests/data/test1319
index 0520b1b32..f50c53165 100644
--- a/tests/data/test1319
+++ b/tests/data/test1319
@@ -31,9 +31,6 @@ body
</data>
<datacheck>
-HTTP/1.1 200 Mighty fine indeed
-pop3: sure hit me
-
From: me@somewhere
To: fake@nowhere
diff --git a/tests/data/test1321 b/tests/data/test1321
index 266fd8828..ee1b47857 100644
--- a/tests/data/test1321
+++ b/tests/data/test1321
@@ -27,9 +27,6 @@ body
yours sincerely
</data>
<datacheck>
-HTTP/1.1 200 Mighty fine indeed
-imap: sure hit me
-
From: me@somewhere
To: fake@nowhere
diff --git a/tests/data/test1400 b/tests/data/test1400
index 0cef18dfd..10faef39b 100644
--- a/tests/data/test1400
+++ b/tests/data/test1400
@@ -70,7 +70,6 @@ int main(int argc, char *argv[])
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1400");
- curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
diff --git a/tests/data/test1401 b/tests/data/test1401
index de4d0aa4f..f330931c9 100644
--- a/tests/data/test1401
+++ b/tests/data/test1401
@@ -82,7 +82,6 @@ int main(int argc, char *argv[])
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1401");
- curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_USERPWD, "fake:user");
curl_easy_setopt(hnd, CURLOPT_HTTPAUTH, (long)CURLAUTH_BASIC);
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, slist1);
diff --git a/tests/data/test1402 b/tests/data/test1402
index d2b05f562..9a9428376 100644
--- a/tests/data/test1402
+++ b/tests/data/test1402
@@ -75,7 +75,6 @@ int main(int argc, char *argv[])
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1402");
- curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "foo=bar&baz=quux");
curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)16);
curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
diff --git a/tests/data/test1403 b/tests/data/test1403
index b08728314..79cdf4964 100644
--- a/tests/data/test1403
+++ b/tests/data/test1403
@@ -72,7 +72,6 @@ int main(int argc, char *argv[])
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1403?foo=bar&baz=quux");
- curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
diff --git a/tests/data/test1404 b/tests/data/test1404
index 53ab37b49..9c6f2e726 100644
--- a/tests/data/test1404
+++ b/tests/data/test1404
@@ -121,7 +121,6 @@ int main(int argc, char *argv[])
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1404");
- curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
mime1 = curl_mime_init(hnd);
part1 = curl_mime_addpart(mime1);
curl_mime_data(part1, "value", CURL_ZERO_TERMINATED);
diff --git a/tests/data/test1405 b/tests/data/test1405
index f3ad3e795..73769eed1 100644
--- a/tests/data/test1405
+++ b/tests/data/test1405
@@ -85,7 +85,6 @@ int main(int argc, char *argv[])
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "ftp://%HOSTIP:%FTPPORT/1405");
- curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_QUOTE, slist1);
curl_easy_setopt(hnd, CURLOPT_POSTQUOTE, slist2);
curl_easy_setopt(hnd, CURLOPT_PREQUOTE, slist3);
diff --git a/tests/data/test1406 b/tests/data/test1406
index 033957f60..796dd2254 100644
--- a/tests/data/test1406
+++ b/tests/data/test1406
@@ -78,7 +78,6 @@ int main(int argc, char *argv[])
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)38);
curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/1406");
- curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
diff --git a/tests/data/test1407 b/tests/data/test1407
index 5a3de1b17..9800eeef3 100644
--- a/tests/data/test1407
+++ b/tests/data/test1407
@@ -59,7 +59,6 @@ int main(int argc, char *argv[])
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "pop3://%HOSTIP:%POP3PORT/1407");
- curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 1L);
curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
diff --git a/tests/data/test1417 b/tests/data/test1417
index 13ba6b168..4d3971ea8 100644
--- a/tests/data/test1417
+++ b/tests/data/test1417
@@ -35,6 +35,7 @@ Trailer: chunky-trailer
Connection: mooo
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccc
+chunky-trailer: header data
</datacheck>
</reply>
diff --git a/tests/data/test1420 b/tests/data/test1420
index 38139e0b0..a5e1c5214 100644
--- a/tests/data/test1420
+++ b/tests/data/test1420
@@ -65,7 +65,6 @@ int main(int argc, char *argv[])
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "imap://%HOSTIP:%IMAPPORT/1420/;UID=1");
- curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
diff --git a/tests/data/test2010 b/tests/data/test2010
index b8b3ddcc2..91a83f4dc 100644
--- a/tests/data/test2010
+++ b/tests/data/test2010
@@ -35,10 +35,10 @@ Metalink
http
</server>
<name>
-Metalink local XML file, HTTP resource, using -o fname -i -D file
+Metalink local XML file, HTTP resource, using -o fname -D file
</name>
<command option="no-output,no-include">
---metalink file://%PWD/log/test2010.metalink -i -o log/outfile2010 -D log/heads2010
+--metalink file://%PWD/log/test2010.metalink -o log/outfile2010 -D log/heads2010
</command>
# local metalink file written before test command runs
<file name="log/test2010.metalink">
diff --git a/tests/data/test266 b/tests/data/test266
index d520be0f4..6b07a782b 100644
--- a/tests/data/test266
+++ b/tests/data/test266
@@ -35,6 +35,7 @@ Trailer: chunky-trailer
Connection: mooo
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccc
+chunky-trailer: header data
</datacheck>
</reply>