mirror of https://github.com/aria2/aria2
Fix segmentaion fault
parent
f022402dc9
commit
f2d85c38cc
|
@ -63,8 +63,8 @@ namespace aria2 {
|
|||
|
||||
HttpRequestEntry::HttpRequestEntry
|
||||
(const std::shared_ptr<HttpRequest>& httpRequest)
|
||||
: httpRequest_(httpRequest),
|
||||
proc_(new HttpHeaderProcessor(HttpHeaderProcessor::CLIENT_PARSER))
|
||||
: httpRequest_{httpRequest},
|
||||
proc_{make_unique<HttpHeaderProcessor>(HttpHeaderProcessor::CLIENT_PARSER)}
|
||||
{}
|
||||
|
||||
HttpRequestEntry::~HttpRequestEntry() {}
|
||||
|
@ -152,9 +152,11 @@ std::shared_ptr<HttpResponse> HttpConnection::receiveResponse()
|
|||
httpResponse->setHttpHeader(proc->getResult());
|
||||
httpResponse->setHttpRequest(outstandingHttpRequests_.front()->
|
||||
getHttpRequest());
|
||||
socketRecvBuffer_->shiftBuffer(proc->getLastBytesProcessed());
|
||||
outstandingHttpRequests_.pop_front();
|
||||
} else {
|
||||
socketRecvBuffer_->shiftBuffer(proc->getLastBytesProcessed());
|
||||
}
|
||||
socketRecvBuffer_->shiftBuffer(proc->getLastBytesProcessed());
|
||||
return httpResponse;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue