diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..dde835273 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,73 @@ +## Legal + +By submitting a pull request, you represent that you have the right to license +your contribution to Apple and the community, and agree by submitting the patch +that your contributions are licensed under the Apache 2.0 license (see +`LICENSE.txt`). + + +## How to submit a bug report + +Please ensure to specify the following: + +* AsyncHTTPClient commit hash +* Contextual information (e.g. what you were trying to achieve with AsyncHTTPClient) +* Simplest possible steps to reproduce + * More complex the steps are, lower the priority will be. + * A pull request with failing test case is preferred, but it's just fine to paste the test case into the issue description. +* Anything that might be relevant in your opinion, such as: + * Swift version or the output of `swift --version` + * OS version and the output of `uname -a` + * Network configuration + + +### Example + +``` +AsyncHTTPClient commit hash: 22ec043dc9d24bb011b47ece4f9ee97ee5be2757 + +Context: +While load testing my program written with AsyncHTTPClient, I noticed +that one file descriptor is leaked per request. + +Steps to reproduce: +1. ... +2. ... +3. ... +4. ... + +$ swift --version +Swift version 4.0.2 (swift-4.0.2-RELEASE) +Target: x86_64-unknown-linux-gnu + +Operating system: Ubuntu Linux 16.04 64-bit + +$ uname -a +Linux beefy.machine 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux + +My system has IPv6 disabled. +``` + +## Writing a Patch + +A good AsyncHTTPClient patch is: + +1. Concise, and contains as few changes as needed to achieve the end result. +2. Tested, ensuring that any tests provided failed before the patch and pass after it. +3. Documented, adding API documentation as needed to cover new functions and properties. +4. Accompanied by a great commit message, using our commit message template. + +### Commit Message Template + +We require that your commit messages match our template. The easiest way to do that is to get git to help you by explicitly using the template. To do that, `cd` to the root of our repository and run: + + git config commit.template dev/git.commit.template + +### Make sure Tests work on Linux + +AsyncHTTPClient uses XCTest to run tests on both macOS and Linux. While the macOS version of XCTest is able to use the Objective-C runtime to discover tests at execution time, the Linux version is not. +For this reason, whenever you add new tests **you have to run a script** that generates the hooks needed to run those tests on Linux, or our CI will complain that the tests are not all present on Linux. To do this, merely execute `ruby ./scripts/generate_linux_tests.rb` at the root of the package and check the changes it made. + +## How to contribute your work + +Please open a pull request at https://github.com/swift-server/async-http-client. Make sure the CI passes, and then wait for code review. diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index c85b1d584..f0e7f8401 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -7,14 +7,23 @@ needs to be listed here. ## COPYRIGHT HOLDERS -- Swift Server Working Group +- Apple Inc. (all contributors with '@apple.com') ### Contributors +- Andrew Lees <32634907+Andrew-Lees11@users.noreply.github.com> - Artem Redkin +- George Barnett - Ian Partridge +- Joe Smith +- Johannes Weiss +- Ludovic Dewailly - Tanner +- Tobias +- Trevör - tomer doron +- tomer doron +- vkill **Updating this list** diff --git a/Package.swift b/Package.swift index f24f15d28..f4f588e0a 100644 --- a/Package.swift +++ b/Package.swift @@ -3,7 +3,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift b/Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift index b8c70e38e..04c678acf 100644 --- a/Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift +++ b/Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AsyncHTTPClient/HTTPClient.swift b/Sources/AsyncHTTPClient/HTTPClient.swift index 912e0b2fc..b78a4195b 100644 --- a/Sources/AsyncHTTPClient/HTTPClient.swift +++ b/Sources/AsyncHTTPClient/HTTPClient.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AsyncHTTPClient/HTTPClientProxyHandler.swift b/Sources/AsyncHTTPClient/HTTPClientProxyHandler.swift index 76b3be0aa..05c1f9cf6 100644 --- a/Sources/AsyncHTTPClient/HTTPClientProxyHandler.swift +++ b/Sources/AsyncHTTPClient/HTTPClientProxyHandler.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AsyncHTTPClient/HTTPHandler.swift b/Sources/AsyncHTTPClient/HTTPHandler.swift index e91504de4..8e988b6b2 100644 --- a/Sources/AsyncHTTPClient/HTTPHandler.swift +++ b/Sources/AsyncHTTPClient/HTTPHandler.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AsyncHTTPClient/RequestValidation.swift b/Sources/AsyncHTTPClient/RequestValidation.swift index 9c2532c4b..be5d7f10f 100644 --- a/Sources/AsyncHTTPClient/RequestValidation.swift +++ b/Sources/AsyncHTTPClient/RequestValidation.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AsyncHTTPClient/Utils.swift b/Sources/AsyncHTTPClient/Utils.swift index babcf1bed..7fbea9c38 100644 --- a/Sources/AsyncHTTPClient/Utils.swift +++ b/Sources/AsyncHTTPClient/Utils.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AsyncHTTPClientTests/HTTPClientCookieTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientCookieTests+XCTest.swift index c8202b152..5382d9c99 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientCookieTests+XCTest.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientCookieTests+XCTest.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AsyncHTTPClientTests/HTTPClientCookieTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientCookieTests.swift index c312a3bca..ad2f4b260 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientCookieTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientCookieTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift index 2ff5b6231..d9778df09 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift index 40ebad75e..bc0d71784 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift b/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift index f8e116f00..4e2f37a35 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift index 5ed67db40..b0e0b6ad6 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AsyncHTTPClientTests/HTTPClientTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientTests.swift index da3dcd902..68dfcc82c 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 1564a0688..b46ac9e2f 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -2,7 +2,7 @@ // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/scripts/check_no_api_breakages.sh b/scripts/check_no_api_breakages.sh index a45be39fa..e2eee38aa 100755 --- a/scripts/check_no_api_breakages.sh +++ b/scripts/check_no_api_breakages.sh @@ -3,7 +3,7 @@ ## ## This source file is part of the AsyncHTTPClient open source project ## -## Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +## Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information diff --git a/scripts/generate_contributors_list.sh b/scripts/generate_contributors_list.sh index 7f0fa7849..00c162638 100755 --- a/scripts/generate_contributors_list.sh +++ b/scripts/generate_contributors_list.sh @@ -3,7 +3,7 @@ ## ## This source file is part of the AsyncHTTPClient open source project ## -## Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +## Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information @@ -27,7 +27,7 @@ cat > "$here/../CONTRIBUTORS.txt" <<- EOF ## COPYRIGHT HOLDERS - - Swift Server Working Group (all contributors with '@apple.com') + - Apple Inc. (all contributors with '@apple.com') ### Contributors diff --git a/scripts/generate_docs.sh b/scripts/generate_docs.sh index 06327b29e..6f7748889 100755 --- a/scripts/generate_docs.sh +++ b/scripts/generate_docs.sh @@ -3,7 +3,7 @@ ## ## This source file is part of the AsyncHTTPClient open source project ## -## Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +## Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information diff --git a/scripts/generate_linux_tests.rb b/scripts/generate_linux_tests.rb index efb8e1692..2f6225347 100755 --- a/scripts/generate_linux_tests.rb +++ b/scripts/generate_linux_tests.rb @@ -36,7 +36,7 @@ def header(fileName) // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/scripts/sanity.sh b/scripts/sanity.sh index 04f1c5f2e..ceca8a222 100755 --- a/scripts/sanity.sh +++ b/scripts/sanity.sh @@ -3,7 +3,7 @@ ## ## This source file is part of the AsyncHTTPClient open source project ## -## Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +## Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information @@ -58,7 +58,7 @@ for language in swift-or-c bash dtrace; do // // This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -77,7 +77,7 @@ EOF ## ## This source file is part of the AsyncHTTPClient open source project ## -## Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors +## Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information @@ -96,7 +96,7 @@ EOF * * This source file is part of the AsyncHTTPClient open source project * - * Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors + * Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors * Licensed under Apache License v2.0 * * See LICENSE.txt for license information