Skip to content

Conversation

@HofmeisterAn
Copy link
Collaborator

@HofmeisterAn HofmeisterAn commented Apr 14, 2025

The /containers/{id}/attach and /exec/{id}/start APIs were missing the connection upgrade headers. Without these headers, the connection doesn't get upgraded, which breaks communication with stdin. Basically, if the headers aren't set, writing to stdin just won't work.

The Docker Engine API docs make it seem like these headers are optional, but either they're actually required or Docker Desktop specifically needs them because of how its internal communication works.

In a follow-up PR, we need to take a look at the /containers/{id}/logs API calls (and their tests). It looks like they're including the multiplexed header (incl. the chunked size), which should be removed.

Edit: Looks like we can't fix the /containers/{id}/logs API call in a separate PR. A test is failing as expected because of the issue mentioned above.

@HofmeisterAn HofmeisterAn added bug Something isn't working enhancement New feature or request labels Apr 14, 2025
@HofmeisterAn HofmeisterAn merged commit 70d225a into main Apr 16, 2025
2 checks passed
@HofmeisterAn HofmeisterAn deleted the bugfix/send-connection-upgrade-headders branch April 16, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Writing to stdin fails while command expects input (/exec/{id}/start).

2 participants