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