]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
77b1029d | 2 | * Copyright (C) 1996-2020 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 |
14 | class FwdState; |
15 | class HttpRequest; | |
16 | ||
5517260a AR |
17 | class AsyncJob; |
18 | template <class Cbc> class CbcPointer; | |
19 | typedef CbcPointer<AsyncJob> AsyncJobPointer; | |
20 | ||
f5e17947 CT |
21 | namespace Http |
22 | { | |
23 | class Tunneler; | |
24 | class TunnelerAnswer; | |
25 | } | |
26 | ||
27c841f6 AR |
27 | namespace Ftp |
28 | { | |
5517260a AR |
29 | |
30 | /// A new FTP Gateway job | |
31 | AsyncJobPointer StartGateway(FwdState *const fwdState); | |
32 | ||
33 | /// A new FTP Relay job | |
34 | AsyncJobPointer StartRelay(FwdState *const fwdState); | |
35 | ||
3cc0f4e7 AR |
36 | /** Construct an URI with leading / in PATH portion for use by CWD command |
37 | * possibly others. FTP encodes absolute paths as beginning with '/' | |
38 | * after the initial URI path delimiter, which happens to be / itself. | |
39 | * This makes FTP absolute URI appear as: ftp:host:port//root/path | |
40 | * To encompass older software which compacts multiple // to / in transit | |
41 | * We use standard URI-encoding on the second / making it | |
42 | * ftp:host:port/%2froot/path AKA 'the FTP %2f hack'. | |
43 | * | |
9837567d | 44 | * TODO: Should be an AnyP::Uri member |
92ae4c86 | 45 | */ |
851feda6 | 46 | const SBuf &UrlWith2f(HttpRequest *); |
92ae4c86 | 47 | |
5517260a | 48 | } // namespace Ftp |
92ae4c86 AR |
49 | |
50 | #endif /* SQUID_CLIENTS_FORWARD_H */ | |
f53969cc | 51 |