-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfhttpc_data_test.go
129 lines (124 loc) · 6.94 KB
/
fhttpc_data_test.go
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package fhttpc
var (
testCACert = `-----BEGIN CERTIFICATE-----
MIIDZzCCAk+gAwIBAgIUK5PrO4WQEqJtdG/7xP4SUJAYNWowDQYJKoZIhvcNAQEL
BQAwQjELMAkGA1UEBhMCWFgxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoGA1UE
CgwTRGVmYXVsdCBDb21wYW55IEx0ZDAgFw0yMTAyMjAxMTU4MTVaGA8yMTIxMDEy
NzExNTgxNVowQjELMAkGA1UEBhMCWFgxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEc
MBoGA1UECgwTRGVmYXVsdCBDb21wYW55IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBALUn/JN7em6pFu2BHgP6Y3Xy0M/FCWUv6H9R1jEvfupuxGpL
IAgOPj31wU0su/NnDhCMKJd6ZY9vRf9Lb+dEEVsq9kMOmkbZDaaxgjqJcgS3LtDo
7og1gLBGWymYLlfZRjjccLhLu8rYrtfmrYW2kKh3B+ud3UJvWZUp5q+0Na93Csfh
B8AJSHno1L2LweVtrFiSnHeHjnbMu1H4pqzFm1Xp8TF04WrkjHCK5vj/3T2pGg/9
VHU7xoa4dJuHx3H9JO0tPZqhxOlbRO/MUex4RQgvdLHE/aE4eJ4GveSpGB/7YrL+
AuZoI4bC4qMRstIIm/ABk09aqUM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