Diffstat (limited to 'noncore/net/ubrowser/old_chunked_algo') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/ubrowser/old_chunked_algo | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/noncore/net/ubrowser/old_chunked_algo b/noncore/net/ubrowser/old_chunked_algo new file mode 100644 index 0000000..9b4ccda --- a/dev/null +++ b/noncore/net/ubrowser/old_chunked_algo | |||
@@ -0,0 +1,57 @@ | |||
1 | readchunk: | ||
2 | if(semi != 0) | ||
3 | { | ||
4 | printf("HttpComm::incoming: semi !=0\n"); | ||
5 | QString newBody = tempString; | ||
6 | if(i != 0) | ||
7 | { | ||
8 | printf("HttpComm::incoming: striping header2\n"); | ||
9 | newBody.remove(0,i); | ||
10 | } | ||
11 | newBody=newBody.remove(0, semi); | ||
12 | if(newBody.length() > clength) | ||
13 | { | ||
14 | newBody.truncate(clength); | ||
15 | nextChunk = true; | ||
16 | } | ||
17 | body += newBody; | ||
18 | bRead += newBody.length(); | ||
19 | printf("HttpComm::incoming: start body chunk1\n"); | ||
20 | printf("%s", newBody.latin1()); | ||
21 | printf("\nHttpComm::incoming: end body chunk\n"); | ||
22 | printf("HttpComm::incoming: bRead: %d\n", bRead); | ||
23 | if(nextChunk) | ||
24 | { | ||
25 | QString tmpQString = tempString; | ||
26 | tmpQString=tmpQString.remove(0, clength); | ||
27 | tempString = (char *)tmpQString.latin1(); | ||
28 | lengthset=false; | ||
29 | goto topchunk; | ||
30 | } | ||
31 | } | ||
32 | else | ||
33 | { | ||
34 | if( (bRead + ba) > clength) | ||
35 | { | ||
36 | // int bRead2=bRead; | ||
37 | for(; bRead < clength; bRead++) | ||
38 | { | ||
39 | body+=tempString[j]; | ||
40 | // bRead++; | ||
41 | } | ||
42 | } | ||
43 | else | ||
44 | { | ||
45 | body += tempString; | ||
46 | bRead += ba; | ||
47 | } | ||
48 | printf("HttpComm::incoming: start body chunk2\n"); | ||
49 | printf("%s", tempString); | ||
50 | printf("\nHttpComm::incoming: end body chunk\n"); | ||
51 | printf("HttpComm::incoming: bRead: %d\n", bRead); | ||
52 | } | ||
53 | if(bRead >= clength) | ||
54 | { | ||
55 | printf("HttpComm::incoming: end chunk\n"); | ||
56 | lengthset=false; | ||
57 | } \ No newline at end of file | ||