-
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.
Add error message for unsupported HTTP version.
- Loading branch information
Showing
12 changed files
with
99 additions
and
21 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:3:5 | ||
| | ||
3 | GET http://localhost:8000/foo | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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,5 @@ | ||
<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 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">http://localhost:8000/foo</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,4 @@ | ||
# 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 http://localhost:8000/foo | ||
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":"http://localhost:8000/foo"},"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