Opened 5 years ago

Closed 5 years ago

#11596 closed defect (fixed)

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: Blocking:
Patch: no

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 (4)

comment:1 Changed 5 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...?

comment:2 Changed 5 years ago by vadz

  • Milestone set to 2.9.1
  • Status changed from new to confirmed

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?

comment:3 Changed 5 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.

comment:4 Changed 5 years ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(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.