summaryrefslogtreecommitdiff
path: root/methods/server.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2013-09-30 16:41:16 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2013-10-01 11:17:02 +0200
commitfd46d30571eb240ec3aae792e7a56061ede50524 (patch)
treea22dd7c94bea0be6b97a92285669d75af156df80 /methods/server.h
parent85050e764482197aad5daeeafd95ff6bf680afcb (diff)
handle complete responses to https range requests
Servers might respond with a complete file either because they don't support Ranges at all or the If-Range condition isn't statisfied, so we have to parse the headers curl gets ourself to seek or truncate the file we have so far. This also finially adds the testcase testing a bunch of partial situations for both, http and https - which is now all green. Closes: 617643, 667699 LP: 1157943
Diffstat (limited to 'methods/server.h')
-rw-r--r--methods/server.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/methods/server.h b/methods/server.h
index 2d43b332f..4dc6a1f2f 100644
--- a/methods/server.h
+++ b/methods/server.h
@@ -49,11 +49,12 @@ struct ServerState
protected:
ServerMethod *Owner;
- bool HeaderLine(std::string Line);
virtual bool ReadHeaderLines(std::string &Data) = 0;
virtual bool LoadNextResponse(bool const ToFile, FileFd * const File) = 0;
public:
+ bool HeaderLine(std::string Line);
+
/** \brief Result of the header acquire */
enum RunHeadersResult {
/** \brief Header ok */
@@ -134,6 +135,7 @@ class ServerMethod : public pkgAcqMethod
virtual void SendReq(FetchItem *Itm) = 0;
virtual ServerState * CreateServerState(URI uri) = 0;
+ virtual void RotateDNS() = 0;
ServerMethod(const char *Ver,unsigned long Flags = 0) : pkgAcqMethod(Ver, Flags), PipelineDepth(0), AllowRedirect(false), Debug(false) {};
virtual ~ServerMethod() {};