mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-15 21:02:07 +00:00
[PR #98] [MERGED] fix(exec): return 200 (not 101) for an attached exec without a protocol upgrade #98
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/LXC2Docker#98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/LXC2Docker/pull/98
Author: @JBailes
Created: 6/27/2026
Status: ✅ Merged
Merged: 6/27/2026
Merged by: @JBailes
Base:
main← Head:fix/exec-start-200-when-not-upgrading📝 Commits (1)
0e8a6d4fix(exec): return 200 (not 101) for attached exec without protocol upgrade📊 Changes
1 file changed (+17 additions, -5 deletions)
View changed files
📝
internal/api/exec.go(+17 -5)📄 Description
POST
/exec/{id}/startalways wroteHTTP/1.1 101 UPGRADED. Docker only returns 101 Switching Protocols when the client asked to upgrade (Upgrade: tcp); a plain attached exec is streamed over 200 OK (Content-Type: application/vnd.docker.raw-stream).Impact (Wolf controllers in-game)
Wolf delivers hot-plugged input devices to the app container by
docker exec-ingmknod <dev> && fake-udev -m <event>(wolfdocker.cpp). Its exec client expects 200 from/exec/start; the shim returned 101, so Wolf logged[DOCKER] error 101and abandoned the hijacked stream — cutting themknod && fake-udevchain off partway. The device node got created (Wolf UI scans evdev directly, so the pad worked there) but the udev hot-plug event never completed, so SDL/Steam in the game container never detected the controller. Result: controller works in Wolf UI, dead in the game.Fix
Return
101 UPGRADEDonly when the request carries anUpgradeheader; otherwise200 OK. The hijacked stream/mux is unchanged.Test plan
go build ./...,go vet ./internal/api/,go test ./internal/api/green (existing detached-exec test unaffected).[DOCKER] error 101on eachSending ...INPUT_CLASS=joystick ACTION=addshould be gone and a controller should hot-plug into Steam.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.