Ticket #11596 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Empty input streams from wxHTTP never EOF

Reported by: nielsm Owned by:
Priority: normal Milestone: 2.9.1
Component: network Version: 2.8.10
Keywords: wxHTTP wxInputStream Cc:
Blocked By: Patch: no
Blocking:

Description

wxHTTP http;
http.Connect(servername);
wxInputStream *stream = http.GetInputStream(path);

If the resource at path on the server is zero bytes, then stream->Eof() will never return true.

Tested on 2.8.10.

Change History

Changed 3 years ago by nielsm

Forgot to mention, this bug may trace several years back. Ticket #3334 seems to be the same issue, though it was closed. The message says a fix was due for merging but perhaps that merging never happened...?

Changed 3 years ago by vadz

  • status changed from new to confirmed
  • milestone set to 2.9.1

It looks indeed the same as #3334 and the changes in it were never applied. Could you please test if changing this > to >= does indeed fix the problem?

Changed 3 years ago by vadz

The fix does seem to be correct to me so I'll apply it even without feedback about testing, at the very least it shouldn't break anything.

Changed 3 years ago by VZ

  • status changed from confirmed to closed
  • resolution set to fixed

(In [63238]) Fix wxHTTPStream::Eof() to return true for empty HTTP resources.

Eof() never returned true when attempting to read an empty resource before.

Closes #11596.

Note: See TracTickets for help on using tickets.