Changes in uspace/lib/http/src/response.c [cbfc8b7:9a09212] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/http/src/response.c
rcbfc8b7 r9a09212 96 96 static int expect(receive_buffer_t *rb, const char *expect) 97 97 { 98 int rc = recv_discard_str(rb, expect); 99 if (rc < 0) 100 return rc; 101 if ((size_t) rc < str_length(expect)) 98 size_t ndisc; 99 int rc = recv_discard_str(rb, expect, &ndisc); 100 if (rc != EOK) 101 return rc; 102 if (ndisc < str_length(expect)) 102 103 return HTTP_EPARSE; 103 104 return EOK; … … 168 169 recv_unmark(rb, &msg_end); 169 170 170 rc = recv_eol(rb); 171 if (rc == 0) 171 size_t nrecv; 172 rc = recv_eol(rb, &nrecv); 173 if (rc == EOK && nrecv == 0) 172 174 rc = HTTP_EPARSE; 173 if (rc < 0) {175 if (rc != EOK) { 174 176 free(message); 175 177 return rc; … … 204 206 goto error; 205 207 206 rc = recv_eol(rb); 207 if (rc == 0) 208 size_t nrecv; 209 rc = recv_eol(rb, &nrecv); 210 if (rc == EOK && nrecv == 0) 208 211 rc = HTTP_EPARSE; 209 if (rc < 0)212 if (rc != EOK) 210 213 goto error; 211 214
Note:
See TracChangeset
for help on using the changeset viewer.