]> git.ipfire.org Git - thirdparty/squid.git/blame_incremental - src/clients/forward.h
Simplify appending SBuf to String (#2108)
[thirdparty/squid.git] / src / clients / forward.h
... / ...
CommitLineData
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_SRC_CLIENTS_FORWARD_H
10#define SQUID_SRC_CLIENTS_FORWARD_H
11
12#include "sbuf/forward.h"
13
14class FwdState;
15class HttpRequest;
16
17namespace Http
18{
19class Tunneler;
20class TunnelerAnswer;
21}
22
23namespace Ftp
24{
25
26/// A new FTP Gateway job
27void StartGateway(FwdState *const fwdState);
28
29/// A new FTP Relay job
30void StartRelay(FwdState *const fwdState);
31
32/** Construct an URI with leading / in PATH portion for use by CWD command
33 * possibly others. FTP encodes absolute paths as beginning with '/'
34 * after the initial URI path delimiter, which happens to be / itself.
35 * This makes FTP absolute URI appear as: ftp:host:port//root/path
36 * To encompass older software which compacts multiple // to / in transit
37 * We use standard URI-encoding on the second / making it
38 * ftp:host:port/%2froot/path AKA 'the FTP %2f hack'.
39 *
40 * TODO: Should be an AnyP::Uri member
41 */
42const SBuf &UrlWith2f(HttpRequest *);
43
44} // namespace Ftp
45
46#endif /* SQUID_SRC_CLIENTS_FORWARD_H */
47