Created
March 4, 2012 08:18
-
-
Save jordansissel/1971244 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/ruby_http_parser/ruby_http_parser.c b/ext/ruby_http_parser/ruby_http_parser.c | |
index 119d7e1..c2dd6ee 100644 | |
--- a/ext/ruby_http_parser/ruby_http_parser.c | |
+++ b/ext/ruby_http_parser/ruby_http_parser.c | |
@@ -319,10 +319,11 @@ VALUE Parser_execute(VALUE self, VALUE data) { | |
wrapper->stopped = Qfalse; | |
size_t nparsed = ryah_http_parser_execute(&wrapper->parser, &settings, ptr, len); | |
- if (wrapper->parser.upgrade) { | |
- rb_str_cat(wrapper->upgrade_data, ptr + nparsed, len - nparsed); | |
+ //if (wrapper->parser.upgrade) { | |
+ //rb_str_cat(wrapper->upgrade_data, ptr + nparsed, len - nparsed); | |
- } else if (nparsed != (size_t)len) { | |
+ //} else | |
+ if (nparsed != (size_t)len) { | |
if (!RTEST(wrapper->stopped) && !RTEST(wrapper->completed)) | |
rb_raise(eParserError, "Could not parse data entirely (%zu != %zu)", nparsed, len); | |
else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment