wails/v3
Josh Ghiloni afbbcc9521
Check for empty buffers instead of nil in responsewriter (#4576)
* Check for empty buffers instead of nil in responsewriter

Use Case:

I am using a service that implements `http.Handler` to send streaming
video to the frontend. Reliably, when sending fragmented MP4 data on
MacOS, the app would panic because the buffer being sent through the
response passed a not-nil check but would panic when accessing the first
byte of the buffer.

This PR addresses that by checking if the buffer is not empty instead of
nil, accounting for the case where len(buf) == 0 and cap(buf) > 0, or
maybe where buf[0] == '\0' (I'm not sure how the nil checks work for
slices)

* Update UNRELEASED_CHANGELOG

* Update v3/internal/assetserver/webview/responsewriter_darwin.go

nil and len check

---------

Co-authored-by: Atterpac <89053530+atterpac@users.noreply.github.com>
2025-09-16 16:03:07 -04:00
..
cmd/wails3 Update CLI to pass through variables (#4488) 2025-08-09 21:44:30 +10:00
examples Add native Liquid Glass effect support for macOS (#4534) 2025-08-24 07:16:19 +10:00
internal Check for empty buffers instead of nil in responsewriter (#4576) 2025-09-16 16:03:07 -04:00
pkg fix(macOS): Use visibleFrame for window centering to exclude menu bar (#4516) 2025-09-07 09:35:08 +00:00
scripts Add clean v3 changelog validation workflow with external Go script 2025-07-13 10:33:00 +10:00
tasks feat: Add Content Protection for Windows and macOS (#4485) 2025-08-09 17:12:39 +10:00
test/docker feat: Complete App API restructuring with organized manager pattern (#4359) 2025-06-21 19:51:14 +10:00
tests/window-visibility-test Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
wep [WEP] Customise Window Titlebars (#3508) 2024-06-08 13:42:27 +10:00
.gitignore Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
.prettierignore chore: add Prettier as format tool (#2689) 2023-05-30 07:40:54 +10:00
.prettierrc.yml chore: add Prettier as format tool (#2689) 2023-05-30 07:40:54 +10:00
go.mod Update CLI to pass through variables (#4488) 2025-08-09 21:44:30 +10:00
go.sum fix: Implement robust cross-platform window visibility fallback for issue #2861 2025-06-14 12:59:44 +10:00
README.md Update doc dependencies 2023-09-08 10:57:47 +10:00
release-notes.txt v3.0.0-alpha.26 2025-08-24 02:40:05 +00:00
release_notes.md v3.0.0-alpha.26 2025-08-24 02:40:05 +00:00
Taskfile.yaml Add native Liquid Glass effect support for macOS (#4534) 2025-08-24 07:16:19 +10:00
TESTING.md feat: Complete App API restructuring with organized manager pattern (#4359) 2025-06-21 19:51:14 +10:00
UNRELEASED_CHANGELOG.md Check for empty buffers instead of nil in responsewriter (#4576) 2025-09-16 16:03:07 -04:00

v3 Alpha

Thanks for wanting to help out with testing/developing Wails v3! This guide will help you get started.

Getting Started

All the instructions for getting started are in the v3 documentation directory: mkdocs-website. Please read the README.md file in that directory for more information.