diff options
author | Daniel Dressler <danieru.dressler@gmail.com> | 2014-06-09 16:19:55 -0600 |
---|---|---|
committer | Daniel Dressler <danieru.dressler@gmail.com> | 2014-06-09 16:19:55 -0600 |
commit | 57ea9f8ecc8b13e98f4a1cbd52057a4f956cd631 (patch) | |
tree | 05d29104c369b5b0e3ffbf98c70455e37aa36fee /src/tcp.c | |
parent | f9d1bd3b433b340f7cf7e6973c598ee185e02b56 (diff) |
Make tcp find end of get requests
Diffstat (limited to 'src/tcp.c')
-rw-r--r-- | src/tcp.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -102,16 +102,17 @@ struct http_packet_t *tcp_packet_get(struct tcp_conn_t *tcp, struct http_message // http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 // Note: this method will not be used by clients // if they expect a responce. - if (size_read == 0) { + if (size_read == 0) msg->is_completed = 1; - } // TODO: Did we receive more than a packets worth? // Assemble packet pkt->filled_size = size_read; - sniff_request_type(pkt); + enum http_request_t type = sniff_request_type(pkt); + if (type == HTTP_HEADER_ONLY) + msg->is_completed = 1; return pkt; |