BHttpRequest::Result() returns a BUrlResult&.
This overrides BUrlRequest::Result. The returned reference points to a BHttpResult and can be cast by callers.
This commit is contained in:
@@ -250,7 +250,7 @@ BHttpRequest::StatusString(status_t threadStatus) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const BHttpResult&
|
const BUrlResult&
|
||||||
BHttpRequest::Result() const
|
BHttpRequest::Result() const
|
||||||
{
|
{
|
||||||
return fResult;
|
return fResult;
|
||||||
@@ -283,8 +283,6 @@ BHttpRequest::_ResetOptions()
|
|||||||
status_t
|
status_t
|
||||||
BHttpRequest::_ProtocolLoop()
|
BHttpRequest::_ProtocolLoop()
|
||||||
{
|
{
|
||||||
printf("UHP[%p]::{Loop} %s\n", this, fUrl.UrlString().String());
|
|
||||||
|
|
||||||
// Initialize the request redirection loop
|
// Initialize the request redirection loop
|
||||||
int8 maxRedirs = fOptMaxRedirs;
|
int8 maxRedirs = fOptMaxRedirs;
|
||||||
bool newRequest;
|
bool newRequest;
|
||||||
@@ -610,8 +608,7 @@ BHttpRequest::_MakeRequest()
|
|||||||
if ((ssize_t)fInputBuffer.Size() >= chunkSize + 2) {
|
if ((ssize_t)fInputBuffer.Size() >= chunkSize + 2) {
|
||||||
// 2 more bytes to handle the closing CR+LF
|
// 2 more bytes to handle the closing CR+LF
|
||||||
bytesRead = chunkSize;
|
bytesRead = chunkSize;
|
||||||
if (inputTempSize < chunkSize + 2)
|
if (inputTempSize < chunkSize + 2) {
|
||||||
{
|
|
||||||
delete[] inputTempBuffer;
|
delete[] inputTempBuffer;
|
||||||
inputTempSize = chunkSize + 2;
|
inputTempSize = chunkSize + 2;
|
||||||
inputTempBuffer = new char[inputTempSize];
|
inputTempBuffer = new char[inputTempSize];
|
||||||
|
|||||||
Reference in New Issue
Block a user