Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. (buf is a char array with the contents of the http data, pLength is a char *)
  2. pLength = strstr(buf, lenTok);
  3. //advance pointer past "Content-Length: " to point to data
  4. if (pLength != NULL)
  5. pLength = (pLength + 16);
  6. int length = 0;
  7. for (int i = 0; i < /*length of Content-Length:*/; i++)
  8. {
  9. length = length * 10;
  10. length = length + (pLength[i] - '0');
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement