summaryrefslogtreecommitdiff
path: root/src/HttpConnection.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-03-05 12:31:57 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-03-05 12:31:57 +0000
commitba7f9f765794bc197750253f07211c66afdd69e5 (patch)
tree5b6dacc204d1ef6f3c2d19416d68524e180f98da /src/HttpConnection.cc
parentcc24f7cdf816a4e127efeaf9b74146e1296467c9 (diff)
2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/HttpHeader.h (Range.h): New include. (status): New variable. (HttpHeader): Initialized status with 0. (getStatus): New function. (setStatus): New function. (getRange): New function. (HttpHeaderHandle): New function. * src/HttpHeader.cc (getRange): New function. * src/Request.h (RequestWeakHandle): New definition. * src/HttpConnection.h (HttpConnectionHandle): New type definition. * src/HttpConnection.cc (receiveResponse): Set HTTP status to headers. * src/main.cc (showUsage): Fixed typo. * src/Segment.h (SegmentHandle): New type definition. * src/BitfieldMan.h (getMissingUnusedLength): New function. * src/BitfieldMan.cc (getMissingUnusedLength): New function.
Diffstat (limited to 'src/HttpConnection.cc')
-rw-r--r--src/HttpConnection.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/HttpConnection.cc b/src/HttpConnection.cc
index 7c080864..095fae5c 100644
--- a/src/HttpConnection.cc
+++ b/src/HttpConnection.cc
@@ -202,7 +202,8 @@ int HttpConnection::receiveResponse(HttpHeader& headers) {
Util::split(hp, line, ':');
headers.put(hp.first, hp.second);
}
- return (int)strtol(status.c_str(), NULL, 10);
+ headers.setStatus(strtol(status.c_str(), 0, 10));
+ return headers.getStatus();
}
bool HttpConnection::useProxy() const {