<feed xmlns='http://www.w3.org/2005/Atom'>
<title>uclient, branch master</title>
<subtitle>libubox HTTP client library</subtitle>
<id>https://git.openwrt.org/project/uclient/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/uclient/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/'/>
<updated>2026-02-20T09:02:16Z</updated>
<entry>
<title>uclient-http: fix data_eof for body-less responses</title>
<updated>2026-02-20T09:02:16Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-02-20T08:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/commit/?id=7a0aa2e4afb4993b7985094aa6847b9fcb04fae8'/>
<id>urn:sha1:7a0aa2e4afb4993b7985094aa6847b9fcb04fae8</id>
<content type='text'>
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 &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>uclient-fetch: support for WebDAV methods</title>
<updated>2026-02-13T07:53:55Z</updated>
<author>
<name>Sergey Ponomarev</name>
</author>
<published>2026-02-13T07:50:25Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/commit/?id=a1531e89f6c22f92a2ac52b0408a7f5c755a09f2'/>
<id>urn:sha1:a1531e89f6c22f92a2ac52b0408a7f5c755a09f2</id>
<content type='text'>
Add COPY, LOCK, MKCOL, MOVE, PROPFIND, PROPPATCH and UNLOCK request
types for WebDAV support.

Add body support for methods that use XML request bodies (PROPFIND,
PROPPATCH, LOCK, MKCOL).

Signed-off-by: Sergey Ponomarev &lt;stokito@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>uclient-fetch: add OPTIONS request type</title>
<updated>2026-02-13T07:53:55Z</updated>
<author>
<name>Sergey Ponomarev</name>
</author>
<published>2026-02-13T07:50:12Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/commit/?id=115c92824b6d4e2117a26cae9ccc8630ae828210'/>
<id>urn:sha1:115c92824b6d4e2117a26cae9ccc8630ae828210</id>
<content type='text'>
Signed-off-by: Sergey Ponomarev &lt;stokito@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>uclient-fetch: Support of --method, --body-data and --body-file</title>
<updated>2026-02-13T07:38:05Z</updated>
<author>
<name>Sergey Ponomarev</name>
</author>
<published>2022-05-09T21:09:09Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/commit/?id=0392dfc8e8c445fc51a83674b18cc6a2f1700689'/>
<id>urn:sha1:0392dfc8e8c445fc51a83674b18cc6a2f1700689</id>
<content type='text'>
The --method allows executing PUT, DELETE, OPTIONS, HEAD e.g.:

    wget -O - -q \
    --method=PUT \
    --body-data='{"id": 42}' \
    --header='Content-Type: application/json' \
    http://api.example.com/

To avoid clashes with the --post-data/file options,
the separate --body-data/file must be used.
They are stored to the same post_data and post_file vars.
Mutual usage of the options is not allowed, same as in GNU wget.

Signed-off-by: Sergey Ponomarev &lt;stokito@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>uclient-fetch: Use HEAD for --spider</title>
<updated>2026-02-13T07:37:53Z</updated>
<author>
<name>Sungbo Eo</name>
</author>
<published>2022-05-09T19:17:34Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/commit/?id=8df3120639a4b4e4779c600742a8ebc4ba6eceb1'/>
<id>urn:sha1:8df3120639a4b4e4779c600742a8ebc4ba6eceb1</id>
<content type='text'>
In GNU wget the --spider first issues a HEAD request, then if HEAD fails, issues a GET request.
In uclient, only a GET request is sent.
The patch changes GET to HEAD e.g. get the file size without downloading it first.

This is still not totally compatible with GNU wget because it does not retry with GET if HEAD fails.
Someone may use the --spider to call a GET only API, so they may be affected.
But this is incorrect usage while others may expect that the spider uses HEAD and don't expect a download.

Signed-off-by: Sungbo Eo &lt;mans0n@gorani.run&gt;
Signed-off-by: Sergey Ponomarev &lt;stokito@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>uclient-fetch: Extract opt_post variable</title>
<updated>2026-02-13T07:37:47Z</updated>
<author>
<name>Sergey Ponomarev</name>
</author>
<published>2022-05-09T18:53:48Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/commit/?id=4fa6fae02f741db18e681ea40c604c0e159b994e'/>
<id>urn:sha1:4fa6fae02f741db18e681ea40c604c0e159b994e</id>
<content type='text'>
The var means that ether --post-data or --post-file was set.

Remove duplicated code to set the Content-Type header.

Signed-off-by: Sergey Ponomarev &lt;stokito@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>uclient-http: fix HTTP authentication after deferred header processing</title>
<updated>2026-02-13T07:30:42Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-02-13T07:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/commit/?id=63413daa876066484a4ee62803aa943f3f19348c'/>
<id>urn:sha1:63413daa876066484a4ee62803aa943f3f19348c</id>
<content type='text'>
Move uclient_http_process_headers() into the deferred callback so that
auth_type is captured before it gets updated. The previous refactor in
commit 80c9bd29c233 ("uclient-http: fix hang on HTTP to HTTPS redirect")
moved the auth_type snapshot after uclient_http_process_headers() had
already changed it from AUTH_TYPE_UNKNOWN, causing the 401 retry path
to never trigger.

Fixes: https://github.com/openwrt/uclient/issues/14
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>ucode: fix memory leak when using ssl context</title>
<updated>2026-01-31T13:56:34Z</updated>
<author>
<name>Eric Fahlgren</name>
</author>
<published>2025-11-10T21:18:04Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/commit/?id=931bbfeb2c92ecaa8ca2262b9bef27df8614ffb9'/>
<id>urn:sha1:931bbfeb2c92ecaa8ca2262b9bef27df8614ffb9</id>
<content type='text'>
Check for and free any SSL context when freeing uclient object.

Fixes: https://github.com/openwrt/uclient/issues/11
Signed-off-by: Eric Fahlgren &lt;ericfahlgren@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>uclient-http: fix hang on HTTP to HTTPS redirect</title>
<updated>2026-01-31T13:54:29Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-01-31T13:45:38Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/commit/?id=80c9bd29c2331f34e91ec47fd7b486f58613a224'/>
<id>urn:sha1:80c9bd29c2331f34e91ec47fd7b486f58613a224</id>
<content type='text'>
Defer header processing to a uloop timeout to avoid modifying stream
state while inside its callback chain. When switching protocols during
a redirect, the old stream's callback code could corrupt the new SSL
stream's state due to the union memory sharing between ustream_fd and
ustream_ssl.

Add HTTP_STATE_PROCESS_HEADERS intermediate state to prevent body data
from being processed before the deferred header_done callback runs.
Also detect protocol changes (HTTP to HTTPS) in uclient_http_connect()
to force a proper disconnect and reconnect.

Fixes: https://github.com/openwrt/uclient/issues/13
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>uclient-http: fix seq field check to use correct field</title>
<updated>2026-01-31T13:46:15Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-01-31T13:45:03Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uclient/commit/?id=9c2ad269c42bca917fc563c97c732d8c47fd1bfc'/>
<id>urn:sha1:9c2ad269c42bca917fc563c97c732d8c47fd1bfc</id>
<content type='text'>
The code was checking uh-&gt;uc.seq for changes to detect redirects, but
only uh-&gt;seq is actually incremented (in uclient_http_init_request and
uclient_http_reset_state). This meant the redirect detection check was
always comparing against an unchanging value.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
</feed>
