Repository navigation
fix(nvhttp): bound GameStream requests before routing - #6098
EnriqueWood wants to merge 1 commit into
Conversation
|
Thanks for investigating these fixes and adding regression coverage. I don't want Sunshine to maintain dependency backports; please take an upstream-first approach here:
Sunshine-specific request limits and GameStream policy can remain in Sunshine, with the regression coverage retained. This is feedback on the dependency-maintenance approach, not a claim that the fixes themselves are incorrect or that full integration testing has passed. Review completed by Codex | Model: unavailable | Thinking: unavailable |
1ccd104 to
e300c0d
Compare
|
Thanks for the review, that makes sense. I went upstream first and trimmed this PR.
What's left is Sunshine's own part: the 64 KiB limit on GameStream requests and an Two things from the first version are not in this one:
I rebased on master and built I also ran a host built from this branch next to my installed one and used Moonlight 6.2.0 on Windows against it: pairing, the app list and launching work as before, and a 720p H.264 stream with the software encoder had video and audio. On the same host, a chunked request cut short on the plain HTTP port just closes that connection. The same tree without the two settings aborts the whole process on that one request ( |
|



Description
Bound requests on the two GameStream servers to 64 KiB and give them an
on_errorhandler, before routing or authentication. GameStream requests carry everything in the query string, including the pairing certificate, and have no body.With the pinned Simple-Web-Server, a chunked request cut short after its chunk data reaches an unchecked
on_errorcall and throwsstd::bad_function_callout of the server thread, which aborts Sunshine. Setting the handler avoids that until the library fix lands.The dependency fixes that were part of this PR at first went upstream instead:
Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
tests/unit/test_http_request_limits.cpp: a truncated chunk in one read and split over two reads, a 64 KiB header next to a pairing-sized query, and a body over the limit.test_sunshineon Fedora 44 with GCC 16.2.1 (Release,BUILD_WERROR=ON). The four tests pass, and all four fail without the settings inconfigure_gamestream_server./serverinfokeeps answering. The same tree without the settings inconfigure_gamestream_serveraborts the process on that request.Type of Change
Checklist
AI Usage
See our AI usage policy.