Skip to content

Commit

Permalink
some code beautifying, removed obsolete comment
Browse files Browse the repository at this point in the history
  • Loading branch information
VanCoding authored and camswords committed Jun 24, 2013
1 parent bb28aeb commit c94d465
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 3 additions & 5 deletions http_parser.c
Expand Up @@ -857,22 +857,20 @@ size_t http_parser_execute (http_parser *parser,

case s_res_status_start:
case s_res_status:
/* the human readable status. e.g. "NOT FOUND"
* we are not humans so just ignore this */

if (ch == CR) {
if(parser->state == s_res_status){
CALLBACK_DATA(status);
}
parser->state = s_res_line_almost_done;
break;
}else if (ch == LF) {
if(parser->state == s_res_status){
} else if (ch == LF) {
if (parser->state == s_res_status) {
CALLBACK_DATA(status);
}
parser->state = s_header_field_start;
break;
}else if(parser->state == s_res_status_start){
} else if(parser->state == s_res_status_start) {
MARK(status);
parser->state = s_res_status;
parser->index = 0;
Expand Down
3 changes: 2 additions & 1 deletion test.c
Expand Up @@ -1643,6 +1643,7 @@ message_complete_cb (http_parser *p)
num_messages++;
return 0;
}

int
response_status_cb (http_parser *p, const char *buf, size_t len)
{
Expand Down Expand Up @@ -1713,8 +1714,8 @@ dontcall_message_complete_cb (http_parser *p)
"parser ***\n\n");
abort();
}
int

int
dontcall_response_status_cb (http_parser *p, const char *buf, size_t len)
{
if (p || buf || len) { } // gcc
Expand Down

0 comments on commit c94d465

Please sign in to comment.