Skip to content

fix(nvhttp): return valid HTTP responses for app artwork failures - #6231

Merged
ReenigneArcher merged 2 commits into
masterfrom
codex/fix-appasset-response
Dec 5, 2026
Merged

ReenigneArcher merged 2 commits into
masterfrom
codex/fix-appasset-response

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

/appasset could return HTTP 200 with a malformed Content-Length when Sunshine could not read the selected cover image. Simple-Web-Server derived the length from the failed file stream.

Resolve inaccessible custom paths through the default artwork and read the selected image before writing response headers. A missing image returns an empty 404 Not Found response. An unreadable image or failed lookup returns an empty 500 Internal Server Error response. Successful requests return the original PNG bytes with their exact length.

Thanks to @eduardomozart for diagnosing and reporting the bug.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

  • Built test_sunshine in MSYS2 UCRT64. All 23 tests in AppAssetTest.*:HttpsHandlerLifetimeTest.*:ProcessPNGTest.* passed and covered all 28 changed executable lines.
  • The HTTPS regressions check the status, Content-Length, and body for missing, locked, non-regular, and readable images.
  • A focused Ubuntu WSL probe with the pinned Simple-Web-Server verified the POSIX lookup-error cases. The full Linux test binary was outside the scope of local validation.
  • Ran uv run --locked lb-update-clang-format and git diff --check. The local Windows test build skipped WiX packaging after the NuGet installation failed.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

This pull request was prepared by Codex, GPT-6.2 Sol, extra high thinking level.

Copy link
Copy Markdown
Member Author

This pull request was prepared by Codex, GPT-6.2 Sol, extra high thinking level.

@ReenigneArcher
ReenigneArcher marked this pull request as ready for review December 5, 2026 16:26
@sonarqubecloud

sonarqubecloud Bot commented Dec 5, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@fece579). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #6231   +/-   ##
=========================================
  Coverage          ?   52.59%           
=========================================
  Files             ?      149           
  Lines             ?    33025           
  Branches          ?    13909           
=========================================
  Hits              ?    17368           
  Misses            ?    13194           
  Partials          ?     2463           
Flag Coverage Δ
Alpine-aarch64 36.56% <60.71%> (?)
Alpine-x86_64 36.69% <60.71%> (?)
Archlinux 37.40% <60.71%> (?)
FreeBSD-amd64 37.27% <39.28%> (?)
Homebrew-macos-15 50.37% <89.28%> (?)
Homebrew-macos-26 50.71% <89.28%> (?)
Homebrew-ubuntu-24.04 38.74% <75.00%> (?)
Linux-AppImage-aarch64 42.43% <75.00%> (?)
Linux-AppImage-x86_64 42.79% <75.00%> (?)
PowerShell 100.00% <ø> (?)
Web-UI 57.88% <ø> (?)
Windows-AMD64 42.70% <67.85%> (?)
Windows-ARM64 36.24% <35.71%> (?)
macOS-arm64 42.72% <39.28%> (?)
macOS-x86_64 41.64% <39.28%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/nvhttp.cpp 69.79% <100.00%> (ø)
src/nvhttp.h 96.15% <ø> (ø)
src/process.cpp 80.72% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fece579...067f83a. Read the comment docs.

@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
Last Updated 2026-12-05 17:29:11 UTC
Source Run CI Run #7115
Commit 067f83a5830131c670b79ba632442950e2dde3dc

Screenshot Comparison

PR #6231 screenshots vs screenshots baseline.

Matrix: AppImage-aarch64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: AppImage-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-AMD64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

@ReenigneArcher
ReenigneArcher merged commit 13ca613 into master Dec 5, 2026
83 checks passed
@ReenigneArcher
ReenigneArcher deleted the codex/fix-appasset-response branch December 5, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant