1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

tests: ignore case of chunked hex numbers in tests

When hyper is used, it emits uppercase hexadecimal numbers for chunked
encoding lengths. Without hyper, lowercase hexadecimal numbers are used.
This change adds preprocessor statements to tests where this is an
issue, and adapts the fixtures to match.

Closes #6987
This commit is contained in:
David Cook 2021-05-03 19:29:40 -05:00 committed by Daniel Stenberg
parent 8419fe4d88
commit 70cf50fb4a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
11 changed files with 56 additions and 0 deletions

View File

@ -63,7 +63,11 @@ Accept: */*
Transfer-Encoding: chunked
Expect: 100-continue
%if hyper
7A
%else
7a
%endif
This is data we upload with PUT
it comes from stdin so MUST be sent
with chunked encoding

View File

@ -57,7 +57,11 @@ Accept: */*
Transfer-Encoding: chunked
Expect: 100-continue
%if hyper
7A
%else
7a
%endif
This is data we upload with PUT
it comes from stdin so MUST be sent
with chunked encoding

View File

@ -48,7 +48,11 @@ Transfer-Encoding: chunked
Trailer: my-super-awesome-trailer, my-other-awesome-trailer
Expect: 100-continue
%if hyper
E
%else
e
%endif
Hello Cloud!
0

View File

@ -47,7 +47,11 @@ Accept: */*
Transfer-Encoding: chunked
Expect: 100-continue
%if hyper
1E
%else
1e
%endif
just some tiny teeny contents
0

View File

@ -56,7 +56,11 @@ one
two
5
three
%if hyper
1D
%else
1d
%endif
and a final longer crap: four
0

View File

@ -100,7 +100,11 @@ one
two
5
three
%if hyper
1D
%else
1d
%endif
and a final longer crap: four
0

View File

@ -108,7 +108,11 @@ y
1
%if hyper
19A
%else
19a
%endif
------------------------------
Content-Disposition: form-data; name="filename"
@ -169,7 +173,11 @@ y
1
%if hyper
19A
%else
19a
%endif
------------------------------
Content-Disposition: form-data; name="filename"

View File

@ -90,7 +90,11 @@ Content-Disposition: attachment; filename="test%TESTNUMBER.filedata"
Content-Type: text/whatever
%if hyper
A5
%else
a5
%endif
This is data from a file.
------------------------------
@ -98,7 +102,11 @@ Content-Disposition: attachment; filename="test%TESTNUMBER.filedata"
Content-Type: text/whatever
%if hyper
AF
%else
af
%endif
This is data from a file.
--------------------------------
@ -107,7 +115,11 @@ This is data from a file.
Content-Disposition: form-data; name="filecontents"
%if hyper
10F
%else
10f
%endif
This is data from a file.
------------------------------

View File

@ -81,7 +81,11 @@ Transfer-Encoding: chunked
Content-Type: multipart/form-data; boundary=----------------------------
Expect: 100-continue
%if hyper
1AF
%else
1af
%endif
------------------------------
Content-Disposition: form-data; name="greeting"
Content-Type: application/X-Greeting

View File

@ -66,7 +66,11 @@ Transfer-Encoding: chunked
Content-Type: multipart/form-data; boundary=----------------------------
Expect: 100-continue
%if hyper
7F
%else
7f
%endif
------------------------------
Content-Disposition: form-data; name="field"
Content-Transfer-Encoding: base64

View File

@ -69,7 +69,11 @@ Transfer-Encoding: chunked
Content-Type: multipart/form-data; boundary=----------------------------
Expect: 100-continue
%if hyper
C1
%else
c1
%endif
------------------------------
Content-Disposition: form-data; name="field1"