Upgrade: tcp

Upgrade: tcp (HTTP)

[1] Docker Remote API v1.19 - Docker () <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/>

Example request:

GET /containers/4fa6e0f0c678/logs?stderr=1&stdout=1&timestamps=1&follow=1&tail=10&since=1428990821 HTTP/1.1

Example response:

HTTP/1.1 101 UPGRADED

Content-Type: application/vnd.docker.raw-stream

Connection: Upgrade

Upgrade: tcp

{{ STREAM }}

[2] Docker Remote API v1.19 - Docker () <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/>

Example request:

POST /containers/16253994b7c4/attach?logs=1&stream=0&stdout=1 HTTP/1.1

Example response:

HTTP/1.1 101 UPGRADED

Content-Type: application/vnd.docker.raw-stream

Connection: Upgrade

Upgrade: tcp

{{ STREAM }}

[3] Docker Remote API v1.19 - Docker () <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/>

In this version of the API, /attach, uses hijacking to transport stdin, stdout, and stderr on the same socket.

To hint potential proxies about connection hijacking, Docker client sends connection upgrade headers similarly to websocket.

Upgrade: tcp

Connection: Upgrade

When Docker daemon detects the Upgrade header, it switches its status code from 200 OK to 101 UPGRADED and resends the same headers.