<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <cite xml:lang="en">Docker Remote API v1.19 - Docker</cite>
(<time>2016-11-17 10:13:12 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/">https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/</anchor-external></figcaption><blockquote><p>Example request:</p><p>GET /containers/4fa6e0f0c678/logs?stderr=1&amp;stdout=1&amp;timestamps=1&amp;follow=1&amp;tail=10&amp;since=1428990821 HTTP/1.1</p><p>Example response:</p><p>HTTP/1.1 101 UPGRADED</p><p>Content-Type: application/vnd.docker.raw-stream</p><p>Connection: Upgrade</p><p>Upgrade: tcp</p><p>{{ STREAM }}</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <cite xml:lang="en">Docker Remote API v1.19 - Docker</cite>
(<time>2016-11-17 10:13:12 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/">https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/</anchor-external></figcaption><blockquote><p>Example request:</p><p>POST /containers/16253994b7c4/attach?logs=1&amp;stream=0&amp;stdout=1 HTTP/1.1</p><p>Example response:</p><p>HTTP/1.1 101 UPGRADED</p><p>Content-Type: application/vnd.docker.raw-stream</p><p>Connection: Upgrade</p><p>Upgrade: tcp</p><p>{{ STREAM }}</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> <cite xml:lang="en">Docker Remote API v1.19 - Docker</cite>
(<time>2016-11-17 10:13:12 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/">https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/</anchor-external></figcaption><blockquote><p>In this version of the API, /attach, uses hijacking to transport stdin, stdout, and stderr on the same socket.</p><p>To hint potential proxies about connection hijacking, Docker client sends connection upgrade headers similarly to websocket.</p><p>Upgrade: tcp</p><p>Connection: Upgrade</p><p>When Docker daemon detects the Upgrade header, it switches its status code from 200 OK to 101 UPGRADED and resends the same headers.</p></blockquote></figure></body></html>