-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specialize libcurl error message for unsupported HTTP version error m…
…essage.
- Loading branch information
Showing
12 changed files
with
95 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
error: Unsupported HTTP version | ||
--> tests_failed/http_version_not_supported.hurl:4:5 | ||
| | ||
4 | GET https://google.com | ||
| ^^^^^^^^^^^^^^^^^^ HTTP/3 is not supported, check --version | ||
| | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"></span><span class="comment"># This test is run when the libcurl used by Hurl</span> | ||
<span class="line"></span><span class="comment"># doesn't support HTTP/3 so it should failed with</span> | ||
<span class="line"></span><span class="comment"># an appropriate error message.</span> | ||
<span class="line"><span class="method">GET</span> <span class="url">https://google.com</span></span> | ||
</span><span class="response"><span class="line"><span class="version">HTTP</span> <span class="number">200</span></span> | ||
</span></span></code></pre> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This test is run when the libcurl used by Hurl | ||
# doesn't support HTTP/3 so it should failed with | ||
# an appropriate error message. | ||
GET https://google.com | ||
HTTP 200 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"entries":[{"request":{"method":"GET","url":"https://google.com"},"response":{"status":200}}]} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Set-StrictMode -Version latest | ||
$ErrorActionPreference = 'Stop' | ||
|
||
$ErrorActionPreference = 'Continue' | ||
curl --version | grep Features | grep -q HTTP3 | ||
if ($LASTEXITCODE -eq 0) { | ||
exit 255 | ||
} | ||
$ErrorActionPreference = 'Stop' | ||
|
||
hurl --http3 tests_failed/http_version_not_supported.hurl |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -Eeuo pipefail | ||
|
||
set +eo pipefail | ||
if (curl --version | grep Features | grep -q HTTP3); then | ||
exit 255 | ||
fi | ||
set -Eeuo pipefail | ||
|
||
hurl --http3 tests_failed/http_version_not_supported.hurl |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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