Skip to content
This repository was archived by the owner on Sep 4, 2019. It is now read-only.

Commit fbfcf96

Browse files
authored
Merge pull request #77 from fp4code/patch-http-parser-pull-357
Solved issue #75
2 parents b14a877 + bfebea3 commit fbfcf96

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

deps/build.jl

+10
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,21 @@ if is_unix()
4040
targetsrcdir = joinpath(BinDeps.srcdir(libhttp_parser),src_dir)
4141
targetlib = joinpath(BinDeps.libdir(libhttp_parser),target)
4242

43+
patchfile = joinpath(BinDeps.depsdir(libhttp_parser), "patches", "pull-357.patch")
44+
if version == v"2.7.1" && !isfile(joinpath(targetsrcdir, "http_parser.c.orig"))
45+
PatchStep = (@build_steps begin
46+
pipeline(`cat $patchfile`, `patch --verbose -b -p1 -d $targetsrcdir`)
47+
end)
48+
else
49+
PatchStep = (@build_steps begin end)
50+
end
51+
4352
provides(SimpleBuild,
4453
(@build_steps begin
4554
CreateDirectory(BinDeps.downloadsdir(libhttp_parser))
4655
FileDownloader(src_url, targetdwlfile)
4756
FileUnpacker(targetdwlfile,BinDeps.srcdir(libhttp_parser),targetsrcdir)
57+
PatchStep
4858
@build_steps begin
4959
CreateDirectory(BinDeps.libdir(libhttp_parser))
5060
@build_steps begin

deps/patches/pull-357.patch

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--- a/http_parser.c
2+
+++ b/http_parser.c
3+
@@ -1816,6 +1816,7 @@
4+
case 2:
5+
parser->upgrade = 1;
6+
7+
+ /* FALLTHROUGH */
8+
case 1:
9+
parser->flags |= F_SKIPBODY;
10+
break;
11+
@@ -2375,7 +2376,7 @@
12+
case s_req_server_with_at:
13+
found_at = 1;
14+
15+
- /* FALLTROUGH */
16+
+ /* FALLTHROUGH */
17+
case s_req_server:
18+
uf = UF_HOST;
19+
break;

0 commit comments

Comments
 (0)