]> git.ipfire.org Git - thirdparty/squid.git/blame - src/clients/forward.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / clients / forward.h
CommitLineData
bbc27441 1/*
4ac4a490 2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
bbc27441
AJ
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
92ae4c86
AR
9#ifndef SQUID_CLIENTS_FORWARD_H
10#define SQUID_CLIENTS_FORWARD_H
11
92e8f3ad
FC
12#include "sbuf/forward.h"
13
92ae4c86
AR
14class FwdState;
15class HttpRequest;
16
5517260a
AR
17class AsyncJob;
18template <class Cbc> class CbcPointer;
19typedef CbcPointer<AsyncJob> AsyncJobPointer;
20
27c841f6
AR
21namespace Ftp
22{
5517260a
AR
23
24/// A new FTP Gateway job
25AsyncJobPointer StartGateway(FwdState *const fwdState);
26
27/// A new FTP Relay job
28AsyncJobPointer StartRelay(FwdState *const fwdState);
29
3cc0f4e7
AR
30/** Construct an URI with leading / in PATH portion for use by CWD command
31 * possibly others. FTP encodes absolute paths as beginning with '/'
32 * after the initial URI path delimiter, which happens to be / itself.
33 * This makes FTP absolute URI appear as: ftp:host:port//root/path
34 * To encompass older software which compacts multiple // to / in transit
35 * We use standard URI-encoding on the second / making it
36 * ftp:host:port/%2froot/path AKA 'the FTP %2f hack'.
37 *
38 * \todo Should be a URL class API call.
92ae4c86 39 */
851feda6 40const SBuf &UrlWith2f(HttpRequest *);
92ae4c86 41
5517260a 42} // namespace Ftp
92ae4c86
AR
43
44#endif /* SQUID_CLIENTS_FORWARD_H */
f53969cc 45