0
@@ -264,7 +264,7 @@ void on_readable(struct ev_loop *loop, ev_io *watcher, int revents)
0
ssize_t read = recv( client->fd
0
, client->request_buffer + client->read
0
- , EBB_BUFFERSIZE - client->read - 1 /* -1 is for making ragel happy below */
0
+ , EBB_BUFFERSIZE - client->read //- 1 /* -1 is for making ragel happy below */
0
if(read <= 0) goto error; /* XXX is this the right action to take for read==0 ? */
0
@@ -272,7 +272,7 @@ void on_readable(struct ev_loop *loop, ev_io *watcher, int revents)
0
ev_timer_again(loop, &client->timeout_watcher);
0
if(FALSE == client_finished_parsing) {
0
- client->request_buffer[client->read] = '\0'; /* make ragel happy */
0
+ //client->request_buffer[client->read] = '\0'; /* make ragel happy */
0
http_parser_execute( &client->parser
0
, client->request_buffer
0
@@ -338,7 +338,12 @@ void on_request(struct ev_loop *loop, ev_io *watcher, int revents)
0
for(i = 0; i < EBB_MAX_CLIENTS; i++)
0
if(server->clients[i].open) count += 1;
0
g_debug("%d open connections", count);
0
+ /* does ragel fuck up if request buffer isn't null? */
0
+ for(i=0; i< EBB_BUFFERSIZE; i++)
0
+ client->request_buffer[i] = 'A';
0
client->server = server;
0
@@ -362,6 +367,7 @@ void on_request(struct ev_loop *loop, ev_io *watcher, int revents)
0
client->parser.content_length = content_length_cb;
0
client->read = client->nread_from_body = 0;
0
client->response_buffer->len = 0; /* see note in ebb_client_close */
Comments
No one has commented yet.