|
@@ -73,6 +73,8 @@ private:
|
|
std::string _query;
|
|
std::string _query;
|
|
unsigned int tryCount;
|
|
unsigned int tryCount;
|
|
|
|
|
|
|
|
+ unsigned int _redirectCount;
|
|
|
|
+
|
|
// whether or not the server supports persistent connection
|
|
// whether or not the server supports persistent connection
|
|
bool _supportsPersistentConnection;
|
|
bool _supportsPersistentConnection;
|
|
// enable keep-alive if possible.
|
|
// enable keep-alive if possible.
|
|
@@ -111,6 +113,10 @@ public:
|
|
unsigned int getTryCount() const { return tryCount; }
|
|
unsigned int getTryCount() const { return tryCount; }
|
|
//bool noMoreTry() const { return tryCount >= PREF_MAX_TRY; }
|
|
//bool noMoreTry() const { return tryCount >= PREF_MAX_TRY; }
|
|
|
|
|
|
|
|
+ void resetRedirectCount();
|
|
|
|
+
|
|
|
|
+ unsigned int getRedirectCount() const;
|
|
|
|
+
|
|
const std::string& getUrl() const { return url; }
|
|
const std::string& getUrl() const { return url; }
|
|
const std::string& getCurrentUrl() const { return currentUrl; }
|
|
const std::string& getCurrentUrl() const { return currentUrl; }
|
|
const std::string& getPreviousUrl() const { return previousUrl; }
|
|
const std::string& getPreviousUrl() const { return previousUrl; }
|
|
@@ -180,6 +186,8 @@ public:
|
|
|
|
|
|
static const std::string PROTO_FTP;
|
|
static const std::string PROTO_FTP;
|
|
|
|
|
|
|
|
+ static const unsigned int MAX_REDIRECT = 20;
|
|
|
|
+
|
|
};
|
|
};
|
|
|
|
|
|
typedef SharedHandle<Request> RequestHandle;
|
|
typedef SharedHandle<Request> RequestHandle;
|