From 03c4946547d39d4d3c4f32878c47bbd701c6f690 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 15 Aug 2015 10:58:10 +0000 Subject: Add configurable timeouts and HEAD request support to S3 client. Allow getting the Content-Length of an HTTPResponse object. --- lib/httpserver/HTTPResponse.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/httpserver/HTTPResponse.h') diff --git a/lib/httpserver/HTTPResponse.h b/lib/httpserver/HTTPResponse.h index 978fa91e..7911f8b5 100644 --- a/lib/httpserver/HTTPResponse.h +++ b/lib/httpserver/HTTPResponse.h @@ -66,6 +66,7 @@ public: int GetResponseCode() const { return mResponseCode; } void SetContentType(const char *ContentType); const std::string& GetContentType() { return mContentType; } + int64_t GetContentLength() { return mContentLength; } void SetAsRedirect(const char *RedirectTo, bool IsLocalURI = true); void SetAsNotFound(const char *URI); @@ -164,7 +165,7 @@ private: bool mKeepAlive; std::string mContentType; std::vector
mExtraHeaders; - int mContentLength; // only used when reading response from stream + int64_t mContentLength; // only used when reading response from stream IOStream* mpStreamToSendTo; // nonzero only when constructed with a stream static std::string msDefaultURIPrefix; -- cgit v1.2.3