wxWebRequestSync does not flush data file (Issue #26477)

8 views
Skip to first unread message

Ryan Ogurek

unread,
May 18, 2026, 1:14:59 PM (13 hours ago) May 18
to wx-...@googlegroups.com, Subscribed
ryancog created an issue (wxWidgets/wxWidgets#26477)

Description

Bug description:

Whenever wxWebRequestSync::Execute is called, if the data storage is set to be a file, the file is buffered, and the writes are never flushed before control goes back to the application, leading to getting (potentially) incomplete data when then reading the file.

Expected vs observed behaviour:

The file is flushed and its whole contents appear when reading.

More information.

Reading through WinHTTP, cURL, and URLSession backends, it doesn't seem like any of them handle this properly. Afaics they should call m_response->Finalize() like wxWebRequestImpl::SetState() (and from wxWebRequestImpl::HandleResult()) does whenever the state is one of the three "end" states. (State_Completed, State_Failed, and State_Cancelled).

Finalize() is private to the wxWebResponseImpl though...

It seems correct that none of these implementations call SetState(), as it handles things for async mode (notably ProcessStateEvent() deleting the file, assuming the event handler used it if it wanted).

It seems Finalize() should just be made public (rather than private and marking wxWebRequestImpl a friend), and called by each of these implementations' Execute().

I'm happy to submit a PR if that sounds reasonable, but I wanted to get check first.

Platform and version information

  • wxWidgets version you use: 3.3.3
  • wxWidgets port you use: wxOSX
  • OS and its version: macOS 15


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26477@github.com>

VZ

unread,
May 18, 2026, 10:43:38 PM (4 hours ago) May 18
to wx-...@googlegroups.com, Subscribed

Closed #26477 as completed via e71c403.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/26477/issue_event/25685984380@github.com>

Reply all
Reply to author
Forward
0 new messages