xref: /aosp_15_r20/external/curl/tests/data/test421 (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker<testcase>
2*6236dae4SAndroid Build Coastguard Worker<info>
3*6236dae4SAndroid Build Coastguard Worker<keywords>
4*6236dae4SAndroid Build Coastguard Workerheader_json
5*6236dae4SAndroid Build Coastguard Worker</keywords>
6*6236dae4SAndroid Build Coastguard Worker</info>
7*6236dae4SAndroid Build Coastguard Worker
8*6236dae4SAndroid Build Coastguard Worker#
9*6236dae4SAndroid Build Coastguard Worker# Server-side
10*6236dae4SAndroid Build Coastguard Worker<reply>
11*6236dae4SAndroid Build Coastguard Worker<data crlf="yes">
12*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK
13*6236dae4SAndroid Build Coastguard Workerserver: nginx
14*6236dae4SAndroid Build Coastguard Workerdate: Tue, 07 Mar 2023 15:14:41 GMT
15*6236dae4SAndroid Build Coastguard Workercontent-type: application/json
16*6236dae4SAndroid Build Coastguard Workercontent-length: 6
17*6236dae4SAndroid Build Coastguard Workervary: Accept-Encoding
18*6236dae4SAndroid Build Coastguard Workeraccess-control-allow-origin: *
19*6236dae4SAndroid Build Coastguard Workervary: Accept-Encoding
20*6236dae4SAndroid Build Coastguard Workerreferrer-policy: strict-origin-when-cross-origin
21*6236dae4SAndroid Build Coastguard Workeraccess-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS
22*6236dae4SAndroid Build Coastguard Workeraccess-control-max-age: 1728000
23*6236dae4SAndroid Build Coastguard Workeraccess-control-allow-headers: Authorization, Content-Type, AuthorizationOauth, X-EARLY-ACCESS
24*6236dae4SAndroid Build Coastguard Workeraccess-control-expose-headers:
25*6236dae4SAndroid Build Coastguard Workervary: Accept
26*6236dae4SAndroid Build Coastguard Workeretag: W/"2678f9ab2ba550d164e7cc014aefd31e"
27*6236dae4SAndroid Build Coastguard Workercache-control: max-age=0, private, must-revalidate
28*6236dae4SAndroid Build Coastguard Workerx-request-id: 375b343b3d2ecf9b442c0daf00fc4a9a
29*6236dae4SAndroid Build Coastguard Workerstrict-transport-security: max-age=31536000; includeSubDomains
30*6236dae4SAndroid Build Coastguard Workerx-content-type-options: nosniff
31*6236dae4SAndroid Build Coastguard Workerx-xss-protection: 1; mode=block
32*6236dae4SAndroid Build Coastguard Workerreferrer-policy: strict-origin-when-cross-origin
33*6236dae4SAndroid Build Coastguard Workerfeature-policy: accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment 'none'; usb 'none'
34*6236dae4SAndroid Build Coastguard Worker
35*6236dae4SAndroid Build Coastguard Worker-foo-
36*6236dae4SAndroid Build Coastguard Worker</data>
37*6236dae4SAndroid Build Coastguard Worker</reply>
38*6236dae4SAndroid Build Coastguard Worker
39*6236dae4SAndroid Build Coastguard Worker#
40*6236dae4SAndroid Build Coastguard Worker# Client-side
41*6236dae4SAndroid Build Coastguard Worker<client>
42*6236dae4SAndroid Build Coastguard Worker<server>
43*6236dae4SAndroid Build Coastguard Workerhttp
44*6236dae4SAndroid Build Coastguard Worker</server>
45*6236dae4SAndroid Build Coastguard Worker<name>
46*6236dae4SAndroid Build Coastguard WorkerHTTP GET multiple headers and %{header_json}
47*6236dae4SAndroid Build Coastguard Worker</name>
48*6236dae4SAndroid Build Coastguard Worker<command>
49*6236dae4SAndroid Build Coastguard Workerhttp://%HOSTIP:%HTTPPORT/%TESTNUMBER -w '%{stderr}%{header_json}\n' -s
50*6236dae4SAndroid Build Coastguard Worker</command>
51*6236dae4SAndroid Build Coastguard Worker</client>
52*6236dae4SAndroid Build Coastguard Worker
53*6236dae4SAndroid Build Coastguard Worker#
54*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot"
55*6236dae4SAndroid Build Coastguard Worker<verify>
56*6236dae4SAndroid Build Coastguard Worker<protocol crlf="yes">
57*6236dae4SAndroid Build Coastguard WorkerGET /%TESTNUMBER HTTP/1.1
58*6236dae4SAndroid Build Coastguard WorkerHost: %HOSTIP:%HTTPPORT
59*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
60*6236dae4SAndroid Build Coastguard WorkerAccept: */*
61*6236dae4SAndroid Build Coastguard Worker
62*6236dae4SAndroid Build Coastguard Worker</protocol>
63*6236dae4SAndroid Build Coastguard Worker<stderr mode="text">
64*6236dae4SAndroid Build Coastguard Worker{"server":["nginx"],
65*6236dae4SAndroid Build Coastguard Worker"date":["Tue, 07 Mar 2023 15:14:41 GMT"],
66*6236dae4SAndroid Build Coastguard Worker"content-type":["application/json"],
67*6236dae4SAndroid Build Coastguard Worker"content-length":["6"],
68*6236dae4SAndroid Build Coastguard Worker"vary":["Accept-Encoding","Accept-Encoding","Accept"],
69*6236dae4SAndroid Build Coastguard Worker"access-control-allow-origin":["*"],
70*6236dae4SAndroid Build Coastguard Worker"referrer-policy":["strict-origin-when-cross-origin","strict-origin-when-cross-origin"],
71*6236dae4SAndroid Build Coastguard Worker"access-control-allow-methods":["GET, POST, PUT, DELETE, OPTIONS"],
72*6236dae4SAndroid Build Coastguard Worker"access-control-max-age":["1728000"],
73*6236dae4SAndroid Build Coastguard Worker"access-control-allow-headers":["Authorization, Content-Type, AuthorizationOauth, X-EARLY-ACCESS"],
74*6236dae4SAndroid Build Coastguard Worker"access-control-expose-headers":[""],
75*6236dae4SAndroid Build Coastguard Worker"etag":["W/\"2678f9ab2ba550d164e7cc014aefd31e\""],
76*6236dae4SAndroid Build Coastguard Worker"cache-control":["max-age=0, private, must-revalidate"],
77*6236dae4SAndroid Build Coastguard Worker"x-request-id":["375b343b3d2ecf9b442c0daf00fc4a9a"],
78*6236dae4SAndroid Build Coastguard Worker"strict-transport-security":["max-age=31536000; includeSubDomains"],
79*6236dae4SAndroid Build Coastguard Worker"x-content-type-options":["nosniff"],
80*6236dae4SAndroid Build Coastguard Worker"x-xss-protection":["1; mode=block"],
81*6236dae4SAndroid Build Coastguard Worker"feature-policy":["accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment 'none'; usb 'none'"]
82*6236dae4SAndroid Build Coastguard Worker}
83*6236dae4SAndroid Build Coastguard Worker</stderr>
84*6236dae4SAndroid Build Coastguard Worker</verify>
85*6236dae4SAndroid Build Coastguard Worker</testcase>
86