/[jscoverage]/trunk/http-message.c
ViewVC logotype

Diff of /trunk/http-message.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 438 by siliconforks, Tue Jun 9 04:31:39 2009 UTC revision 484 by siliconforks, Fri Oct 9 16:00:33 2009 UTC
# Line 813  Line 813 
813    }    }
814    
815    uint8_t * s = p;    uint8_t * s = p;
816    for (*bytes_read = 0; *bytes_read < capacity; (*bytes_read)++) {    *bytes_read = 0;
817      while (*bytes_read < capacity) {
818      if (message->bytes_remaining == 0) {      if (message->bytes_remaining == 0) {
819        result = read_chunk_size_line(message);        result = read_chunk_size_line(message);
820        if (result != 0) {        if (result != 0) {
# Line 842  Line 843 
843        break;        break;
844      }      }
845      s[*bytes_read] = (uint8_t) c;      s[*bytes_read] = (uint8_t) c;
846        ++(*bytes_read);
847      message->bytes_remaining--;      message->bytes_remaining--;
848    
849        if (message->bytes_remaining == 0) {
850          // read CRLF terminating chunk
851          result = HTTPConnection_read_octet(message->connection, &c);
852          if (result != 0) {
853            break;
854          }
855          if (c != '\r') {
856            result = -1;
857            message->chunked_body_state = CHUNKED_BODY_DONE;
858            break;
859          }
860          result = HTTPConnection_read_octet(message->connection, &c);
861          if (result != 0) {
862            break;
863          }
864          if (c != '\n') {
865            result = -1;
866            message->chunked_body_state = CHUNKED_BODY_DONE;
867            break;
868          }
869        }
870    }    }
871    
872    return result;    return result;

Legend:
Removed from v.438  
changed lines
  Added in v.484

  ViewVC Help
Powered by ViewVC 1.1.24