Diffstat (limited to 'noncore/net/ubrowser/httpcomm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/ubrowser/httpcomm.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/noncore/net/ubrowser/httpcomm.cpp b/noncore/net/ubrowser/httpcomm.cpp index 54f7acf..b086b58 100644 --- a/noncore/net/ubrowser/httpcomm.cpp +++ b/noncore/net/ubrowser/httpcomm.cpp @@ -154,8 +154,9 @@ void HttpComm::incoming() if(clength==0) { processBody(); done=true; + return; } //still more, but it hasnt been recieved yet if(ba <= j) { @@ -193,9 +194,9 @@ void HttpComm::incoming() //the chunk extends beyond the current data; else { body+=tempQString; - bRead+=ba; + bRead+=tempQString.length(); printf("HttpComm::incoming: start new body piece 2: \n"); printf("%s", tempQString.latin1() ); printf("HttpComm::incoming: end new body piece 2.\n"); done=true; @@ -223,9 +224,9 @@ void HttpComm::incoming() //the chunk extends beyond the current data; else { body+=tempQString; - bRead+=ba; + bRead+=tempQString.length(); printf("HttpComm::incoming: start new body piece 4: \n"); printf("%s", tempQString.latin1() ); printf("HttpComm::incoming: end new body piece 4.\n"); done=true; @@ -278,18 +279,20 @@ void HttpComm::parseHeader() } void HttpComm::processBody() { + printf("HttpComm::processBody: processing body\n"); // printf("HttpComm::processBody: start body\n\n"); // printf("%s", body.latin1()); // printf("HttpComm::processBody: end body\n"); int lastSlash = file.findRev('/'); QString end = file; - end.truncate(lastSlash-1); + end.truncate(lastSlash+1); QString context("http://"+host+':'+portS+end); + printf("HttpComm::processBody: context: %s\n", context.latin1() ); browser->setTextFormat(RichText); + browser->mimeSourceFactory()->setFilePath(context); browser->setText(body, context); - printf("%s\n", context.latin1() ); } |