uvicorn icon indicating copy to clipboard operation
uvicorn copied to clipboard

Add socket path to scope["server"]

Open Kludex opened this issue 11 months ago • 1 comments

I think we can refactor a bit what is here, but this should solve https://github.com/encode/uvicorn/discussions/2559.

Kludex avatar Jan 12 '25 17:01 Kludex

I haven't tried it yet but those seem like the right changes, which are safe to do without much refactoring.

Only minor (subjective):

  • /tmp is global and it's better to use a unique prefix for files like uvicorn- or uvicorn/, otherwise create test.sock in the current directory - Edit: But that's okay, if MockSocket thing doesn't create a real file
  • if rather than elif.

nggit avatar Jan 12 '25 22:01 nggit