1commit a143133d43420ef89e4ba0d84c73998863cf9f81 2Author: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> 3Date: Wed Jul 11 18:46:00 2012 +0900 4 5 Use http_parser for tunneling connection transparently 6 7diff --git a/examples/http-parser/http_parser.c b/examples/http-parser/http_parser.c 8index 0c11eb8..610da57 100644 9--- a/examples/http-parser/http_parser.c 10+++ b/examples/http-parser/http_parser.c 11@@ -1627,9 +1627,14 @@ size_t http_parser_execute (http_parser *parser, 12 13 /* Exit, the rest of the connect is in a different protocol. */ 14 if (parser->upgrade) { 15- parser->state = NEW_MESSAGE(); 16- CALLBACK_NOTIFY(message_complete); 17- return (p - data) + 1; 18+ /* We want to use http_parser for tunneling connection 19+ transparently */ 20+ /* Read body until EOF */ 21+ parser->state = s_body_identity_eof; 22+ break; 23+ /* parser->state = NEW_MESSAGE(); */ 24+ /* CALLBACK_NOTIFY(message_complete); */ 25+ /* return (p - data) + 1; */ 26 } 27 28 if (parser->flags & F_SKIPBODY) { 29