diff --git a/Sources/CNIOHTTPParser/AUTHORS b/Sources/CNIOHTTPParser/AUTHORS new file mode 100644 index 00000000000..5323b685cae --- /dev/null +++ b/Sources/CNIOHTTPParser/AUTHORS @@ -0,0 +1,68 @@ +# Authors ordered by first contribution. +Ryan Dahl +Jeremy Hinegardner +Sergey Shepelev +Joe Damato +tomika +Phoenix Sol +Cliff Frey +Ewen Cheslack-Postava +Santiago Gala +Tim Becker +Jeff Terrace +Ben Noordhuis +Nathan Rajlich +Mark Nottingham +Aman Gupta +Tim Becker +Sean Cunningham +Peter Griess +Salman Haq +Cliff Frey +Jon Kolb +Fouad Mardini +Paul Querna +Felix Geisendörfer +koichik +Andre Caron +Ivo Raisr +James McLaughlin +David Gwynne +Thomas LE ROUX +Randy Rizun +Andre Louis Caron +Simon Zimmermann +Erik Dubbelboer +Martell Malone +Bertrand Paquet +BogDan Vatra +Peter Faiman +Corey Richardson +Tóth Tamás +Cam Swords +Chris Dickinson +Uli Köhler +Charlie Somerville +Patrik Stutz +Fedor Indutny +runner +Alexis Campailla +David Wragg +Vinnie Falco +Alex Butum +Rex Feng +Alex Kocharin +Mark Koopman +Helge Heß +Alexis La Goutte +George Miroshnykov +Maciej Małecki +Marc O'Morain +Jeff Pinner +Timothy J Fontaine +Akagi201 +Romain Giraud +Jay Satiro +Arne Steen +Kjell Schubert +Olivier Mengué diff --git a/Sources/CNIOHTTPParser/LICENSE-MIT b/Sources/CNIOHTTPParser/LICENSE-MIT new file mode 100644 index 00000000000..1ec0ab4e174 --- /dev/null +++ b/Sources/CNIOHTTPParser/LICENSE-MIT @@ -0,0 +1,19 @@ +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/Sources/CNIOHTTPParser/update_and_patch_http_parser.sh b/Sources/CNIOHTTPParser/update_and_patch_http_parser.sh index e4b3a0271e0..a9dc28ec897 100755 --- a/Sources/CNIOHTTPParser/update_and_patch_http_parser.sh +++ b/Sources/CNIOHTTPParser/update_and_patch_http_parser.sh @@ -26,6 +26,18 @@ case "$(uname -s)" in ;; esac +if ! hash ${sed} 2>/dev/null; then + echo "You need sed \"${sed}\" to run this script ..." + echo + echo "On macOS: brew install gnu-sed" + exit 42 +fi + +for f in LICENSE-MIT AUTHORS; do + curl -o "${f}" \ + -Ls "https://raw.githubusercontent.com/nodejs/http-parser/master/${f}" +done + for f in http_parser.c http_parser.h; do ( echo "/* Additional changes for SwiftNIO:" echo " - prefixed all symbols by 'c_nio_'" @@ -49,6 +61,9 @@ for f in http_parser.c http_parser.h; do -e 's/\b\(http_parser_version\)/c_nio_\1/g' \ -e 's/\b\(http_should_keep_alive\)/c_nio_\1/g' \ "$here/c_nio_$f" +done + +mv "$here/c_nio_http_parser.h" "$here/include/c_nio_http_parser.h" tmp=$(mktemp -d /tmp/.test_compile_XXXXXX) @@ -61,6 +76,4 @@ test 0 -eq $num_non_nio || { } rm -rf "$tmp" -done -mv "$here/c_nio_http_parser.h" "$here/include/c_nio_http_parser.h"