summaryrefslogtreecommitdiff
path: root/src/HttpConnection.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-02-22 16:01:54 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-02-22 16:01:54 +0000
commit44beebd257b0fb265bea5387850b9beb33c0adc2 (patch)
tree0ec08e4aad18ccff2d578aca1c0b3799d2716c6c /src/HttpConnection.h
parentd027ca8e7c383e9755d6fb997e8a880df99e88b9 (diff)
parent87a229cab18679042beb06076e5dec1dcfadaeae (diff)
Tagging release 0.2.0 of aria2release-0.2.0
Diffstat (limited to 'src/HttpConnection.h')
-rw-r--r--src/HttpConnection.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/HttpConnection.h b/src/HttpConnection.h
index c918d21d..f37ed892 100644
--- a/src/HttpConnection.h
+++ b/src/HttpConnection.h
@@ -27,30 +27,33 @@
#include "Request.h"
#include "Option.h"
#include "Logger.h"
+#include "HttpHeader.h"
#include <map>
#include <string>
using namespace std;
-typedef multimap<string, string> HttpHeader;
+//typedef multimap<string, string> HttpHeader;
class HttpConnection {
private:
- string getHost(const string& host, int port);
- string createRequest(const Request* req, const Segment& segment);
- bool useProxy();
- bool useProxyAuth();
- bool useBasicAuth();
+ string getHost(const string& host, int port) const;
+ string createRequest(const Segment& segment) const;
+ bool useProxy() const;
+ bool useProxyAuth() const;
+ bool useProxyGet() const;
+ string getProxyAuthString() const;
int cuid;
- Socket* socket;
+ const Socket* socket;
+ const Request* req;
const Option* option;
- Logger* logger;
+ const Logger* logger;
+ string header;
public:
+ HttpConnection(int cuid, const Socket* socket, const Request* req, const Option* op, const Logger* logger);
- HttpConnection(int cuid, Socket* socket, const Option* op, Logger* logger);
-
- void sendRequest(const Request* req, const Segment& segment);
- void sendProxyRequest(const Request* req);
+ void sendRequest(const Segment& segment) const;
+ void sendProxyRequest() const;
int receiveResponse(HttpHeader& headers);
};