| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8e592bb commit 188cff3
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ | |||
| 19 | 19 | # IN THE SOFTWARE. | |
| 20 | 20 | ||
| 21 | 21 | PLATFORM ?= $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"') | |
| 22 | - SONAME ?= libhttp_parser.so.2.5.1 | ||
| 22 | + SONAME ?= libhttp_parser.so.2.5.2 | ||
| 23 | 23 | ||
| 24 | 24 | CC?=gcc | |
| 25 | 25 | AR?=ar | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -438,7 +438,7 @@ enum http_host_state | |||
| 438 | 438 | * character or %x80-FF | |
| 439 | 439 | **/ | |
| 440 | 440 | #define IS_HEADER_CHAR(ch) \ | |
| 441 | - (ch == CR || ch == LF || ch == 9 || (ch > 31 && ch != 127)) | ||
| 441 | + (ch == CR || ch == LF || ch == 9 || ((unsigned char)ch > 31 && ch != 127)) | ||
| 442 | 442 | ||
| 443 | 443 | #define start_state (parser->type == HTTP_REQUEST ? s_start_req : s_start_res) | |
| 444 | 444 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ extern "C" { | |||
| 27 | 27 | /* Also update SONAME in the Makefile whenever you change these. */ | |
| 28 | 28 | #define HTTP_PARSER_VERSION_MAJOR 2 | |
| 29 | 29 | #define HTTP_PARSER_VERSION_MINOR 5 | |
| 30 | - #define HTTP_PARSER_VERSION_PATCH 1 | ||
| 30 | + #define HTTP_PARSER_VERSION_PATCH 2 | ||
| 31 | 31 | ||
| 32 | 32 | #include <sys/types.h> | |
| 33 | 33 | #if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3251,7 +3251,7 @@ test_double_content_length_error (int req) | |||
| 3251 | 3251 | ||
| 3252 | 3252 | parsed = http_parser_execute(&parser, &settings_null, buf, buflen); | |
| 3253 | 3253 | if (parsed != buflen) { | |
| 3254 | - assert(HTTP_PARSER_ERRNO(&parser) == HPE_MULTIPLE_CONTENT_LENGTH); | ||
| 3254 | + assert(HTTP_PARSER_ERRNO(&parser) == HPE_UNEXPECTED_CONTENT_LENGTH); | ||
| 3255 | 3255 | return; | |
| 3256 | 3256 | } | |
| 3257 | 3257 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,18 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + | ||
| 3 | + const common = require('../common'); | ||
| 4 | + const http = require('http'); | ||
| 5 | + const assert = require('assert'); | ||
| 6 | + | ||
| 7 | + const server = http.createServer(common.mustCall((req, res) => { | ||
| 8 | + res.end('ok'); | ||
| 9 | + })); | ||
| 10 | + server.listen(common.PORT, () => { | ||
| 11 | + http.get({ | ||
| 12 | + port: common.PORT, | ||
| 13 | + headers: {'Test': 'Düsseldorf'} | ||
| 14 | + }, common.mustCall((res) => { | ||
| 15 | + assert.equal(res.statusCode, 200); | ||
| 16 | + server.close(); | ||
| 17 | + })); | ||
| 18 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments