MCPcopy
hub / github.com/caddyserver/caddy / TestH2ToH1ChunkedResponse

Function TestH2ToH1ChunkedResponse

caddytest/integration/stream_test.go:207–360  ·  view source on GitHub ↗

(see https://github.com/caddyserver/caddy/issues/3606 for use case)

(t *testing.T)

Source from the content-addressed store, hash-verified

205
206// (see https://github.com/caddyserver/caddy/issues/3606 for use case)
207func TestH2ToH1ChunkedResponse(t *testing.T) {
208 tester := caddytest.NewTester(t)
209 tester.InitServer(`
210{
211 "admin": {
212 "listen": "localhost:2999"
213 },
214 "logging": {
215 "logs": {
216 "default": {
217 "level": "DEBUG"
218 }
219 }
220 },
221 "apps": {
222 "http": {
223 "http_port": 9080,
224 "https_port": 9443,
225 "grace_period": 1,
226 "servers": {
227 "srv0": {
228 "listen": [
229 ":9443"
230 ],
231 "routes": [
232 {
233 "handle": [
234 {
235 "handler": "subroute",
236 "routes": [
237 {
238 "handle": [
239 {
240 "encodings": {
241 "gzip": {}
242 },
243 "handler": "encode"
244 }
245 ]
246 },
247 {
248 "handle": [
249 {
250 "handler": "reverse_proxy",
251 "upstreams": [
252 {
253 "dial": "localhost:54321"
254 }
255 ]
256 }
257 ],
258 "match": [
259 {
260 "path": [
261 "/tov2ray"
262 ]
263 }
264 ]

Callers

nothing calls this directly

Calls 6

InitServerMethod · 0.95
AssertResponseCodeMethod · 0.95
NewTesterFunction · 0.92
GenerateRandomStringFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected