-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-http.sh
More file actions
executable file
·57 lines (51 loc) · 1.62 KB
/
debug-http.sh
File metadata and controls
executable file
·57 lines (51 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# Test script to debug HTTP parsing issues
echo "Testing HTTP parsing with simple request first..."
# Test 1: Simple GET request
echo "=== Test 1: Simple GET request ==="
curl -v --http1.1 \
--cert ./out/my-client-chain.pem \
--key ./out/my-client.key \
--cacert ./out/rootca-chain.pem \
--tlsv1.2 \
--ciphers ECDHE-ECDSA-AES128-GCM-SHA256 \
--insecure \
https://127.0.0.1:8443/health
echo -e "\n\n=== Test 2: Simple POST without body ==="
curl -v --http1.1 \
--cert ./out/my-client-chain.pem \
--key ./out/my-client.key \
--cacert ./out/rootca-chain.pem \
--tlsv1.2 \
--ciphers ECDHE-ECDSA-AES128-GCM-SHA256 \
-X POST \
--insecure \
https://127.0.0.1:8443/edev
echo -e "\n\n=== Test 3: POST with small body ==="
curl -v --http1.1 \
--cert ./out/my-client-chain.pem \
--key ./out/my-client.key \
--cacert ./out/rootca-chain.pem \
--tlsv1.2 \
--ciphers ECDHE-ECDSA-AES128-GCM-SHA256 \
-H "Content-Type: application/sep+xml" \
-d '<test>hello</test>' \
--insecure \
https://127.0.0.1:8443/edev
echo -e "\n\n=== Test 4: Original request ==="
curl -v --http1.1 \
--cert ./out/my-client-chain.pem \
--key ./out/my-client.key \
--cacert ./out/rootca-chain.pem \
--tlsv1.2 \
--ciphers ECDHE-ECDSA-AES128-GCM-SHA256 \
-H "Content-Type: application/sep+xml" \
-H "Accept: application/sep+xml" \
--insecure \
-d '<EndDevice xmlns="urn:ieee:std:2030.5:ns">
<sFDI>198325674429</sFDI>
<lFDI>49e1cf69294c0588202f4f2cbd4f80044902ca51</lFDI>
<changedTime>1379905200</changedTime>
<deviceCategory>0f</deviceCategory>
</EndDevice>' \
https://127.0.0.1:8443/edev