Skip to content

Compose should send connection upgrade headers #3700

Closed

Description

@dgageot

To hint proxies about connection hijacking, Compose should send connection upgrade headers like the docker cli does.

From https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/4-2-hijacking:

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

On Docker for Desktop, the proxy that sits between Docker Compose and the daemon will not be aware that the connection will be hijacked. This can lead to an issue where the proxy will install a CloseNotifier and just after that will hijack the connection, which is know to be incompatible. See #3685

Activity

  1. justincormack commented on Jul 7, 2016

    @justincormack
    Contributor

    We have a hacky workaround now in docker 4 mac/win, but it would be nice to fix this.

  2. aanand commented on Jul 7, 2016

    @aanand

    Makes sense. I think the fix needs to go in docker-py.

  3. added this to the 1.9.0 milestone on Jul 7, 2016
  4. justincormack commented on Jul 8, 2016

    @justincormack
    Contributor

    @aanand do you think there is a chance of fixing this for 1.8? It is proving very hard to work around for docker for mac.

  5. dgageot commented on Jul 8, 2016

    @dgageot
    MemberAuthor

    Just submitted a patch to docker-py. Not sure I've got it all right, though docker/docker-py#1124

  6. modified the milestones: 1.8.0, 1.9.0 on Jul 8, 2016
  7. aanand commented on Jul 22, 2016

    @aanand

    Support has gone in with docker/docker-py#1130, so we just need to do a docker-py release and update the version in requirements.txt.

  8. aanand commented on Jul 27, 2016

    @aanand

    OK, this should now be closed by #3769

  9. modified the milestones: 1.8.1, 1.8.0 on Jul 27, 2016
  10. reopened this on Jul 27, 2016
  11. shin- commented on Jul 27, 2016

    @shin-

    Those changes unfortunately did not make it in docker-py 1.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions