summaryrefslogtreecommitdiff
path: root/methods/http.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-07-31 18:05:56 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-08-10 23:19:44 +0200
commit30060442025824c491f58887ca7369f3c572fa57 (patch)
treebe5a114540fe297adf3c1bf9c167d8b8c627575b /methods/http.h
parent4bba5a88d0f6afde4414b586b64c48a4851d5324 (diff)
implement generic config fallback for methods
The https method implemented for a long while now a hardcoded fallback to the same options in http, which, while it works, is rather inflexible if we want to allow the methods to use another name to change their behavior slightly, like apt-transport-tor does to https – most of the diff being s#https#tor#g which then fails to do the full circle fallthrough tor -> https -> http for https sources. With this config infrastructure this could be implemented now.
Diffstat (limited to 'methods/http.h')
-rw-r--r--methods/http.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/methods/http.h b/methods/http.h
index e6b11d642..4d22c88f9 100644
--- a/methods/http.h
+++ b/methods/http.h
@@ -86,7 +86,7 @@ class CircleBuf
// Dump everything
void Stats();
- explicit CircleBuf(unsigned long long Size);
+ CircleBuf(HttpMethod const * const Owner, unsigned long long Size);
~CircleBuf();
};
@@ -126,8 +126,6 @@ class HttpMethod : public ServerMethod
public:
virtual void SendReq(FetchItem *Itm) APT_OVERRIDE;
- virtual bool Configuration(std::string Message) APT_OVERRIDE;
-
virtual std::unique_ptr<ServerState> CreateServerState(URI const &uri) APT_OVERRIDE;
virtual void RotateDNS() APT_OVERRIDE;
virtual DealWithHeadersResult DealWithHeaders(FetchResult &Res) APT_OVERRIDE;
@@ -138,11 +136,7 @@ class HttpMethod : public ServerMethod
public:
friend struct HttpServerState;
- HttpMethod() : ServerMethod("http", "1.2",Pipeline | SendConfig)
- {
- File = 0;
- Server = 0;
- };
+ explicit HttpMethod(std::string &&pProg);
};
#endif