uclient-http: fix data_eof for body-less responses master
authorFelix Fietkau <nbd@nbd.name>
Fri, 20 Feb 2026 08:36:40 +0000 (08:36 +0000)
committerFelix Fietkau <nbd@nbd.name>
Fri, 20 Feb 2026 09:02:16 +0000 (09:02 +0000)
commit7a0aa2e4afb4993b7985094aa6847b9fcb04fae8
tree2f89c0f157632e15e764e813040deb7400415766
parenta1531e89f6c22f92a2ac52b0408a7f5c755a09f2
uclient-http: fix data_eof for body-less responses

HEAD, 204 and 304 responses have no body by definition. When the
server includes a Content-Length header (indicating the resource
size, not the response body size), uclient_notify_eof() failed to
set data_eof, causing a spurious "Connection reset prematurely"
error.

Fixes: https://github.com/openwrt/uclient/issues/15
Signed-off-by: Felix Fietkau <nbd@nbd.name>
uclient-http.c