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