]> git.ipfire.org Git - thirdparty/curl.git/commit
lib: redirect handling by protocol handler
authorStefan Eissing <stefan@eissing.org>
Thu, 23 Jan 2025 10:48:06 +0000 (11:48 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 24 Jan 2025 10:00:34 +0000 (11:00 +0100)
commit1213c312722f93b7856d20c3d1a13ef39b9b214f
treeaabf0d5d18a17db6b2181c0ea4db4b846b8f9a6e
parente83818cae1da495939aee5def1172ca1d20cc1e4
lib: redirect handling by protocol handler

Adds a `follow()` callback to protocol handlers, so they may decide how
to act on a `newurl` after a request has been done. This is optional.

This moves the HTTP code for handling redirects from multi.c to http.c
where it should be. If we ever add a protocol with its own logic, it
would install its own follow function.

Closes #16075
24 files changed:
lib/curl_rtmp.c
lib/dict.c
lib/file.c
lib/ftp.c
lib/gopher.c
lib/http.c
lib/http.h
lib/imap.c
lib/ldap.c
lib/mqtt.c
lib/multi.c
lib/openldap.c
lib/pop3.c
lib/rtsp.c
lib/smb.c
lib/smtp.c
lib/telnet.c
lib/tftp.c
lib/transfer.h
lib/urldata.h
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vssh/wolfssh.c
lib/ws.c