diff --git a/integration/report/html/index.html b/integration/report/html/index.html index 4061ecee5e4..9c596b788bb 100644 --- a/integration/report/html/index.html +++ b/integration/report/html/index.html @@ -1,2 +1,2 @@ -Hurl Report

Hurl Report

Tue, 20 Oct 2020 13:51:30 +0200
filenameduration
tests/assert_base64.hurl0.005s
tests/assert_header.hurl0.006s
tests/assert_json.hurl0.012s
tests/assert_match.hurl0.022s
tests/assert_regex.hurl0.008s
tests/assert_xpath.hurl0.006s
tests/bytes.hurl0.005s
tests/capture_and_assert.hurl0.006s
tests/captures.hurl0.012s
tests/compressed.hurl0.014s
tests/cookies.hurl0.019s
tests/cookie_storage.hurl0.007s
tests/delete.hurl0.005s
tests/empty.hurl0s
tests/encoding.hurl0.008s
tests/error_assert_base64.hurl0.006s
tests/error_assert_content_encoding.hurl0.006s
tests/error_assert_decompress.hurl0.005s
tests/error_assert_file.hurl0.005s
tests/error_assert_header_not_found.hurl0.005s
tests/error_assert_header_value.hurl0.006s
tests/error_assert_http_version.hurl0.005s
tests/error_assert_invalid_predicate_type.hurl0.007s
tests/error_assert_match_utf8.hurl0.005s
tests/error_assert_query_cookie.hurl0.009s
tests/error_assert_query_invalid_regex.hurl0.006s
tests/error_assert_query_invalid_xpath.hurl0.006s
tests/error_assert_status.hurl0.006s
tests/error_assert_template_variable_not_found.hurl0.005s
tests/error_assert_value_error.hurl0.009s
tests/error_assert_variable.hurl0.008s
tests/error_file_read_access.hurl0s
tests/error_http_connection.hurl0.028s
tests/error_invalid_jsonpath.hurl0.005s
tests/error_invalid_url.hurl0s
tests/error_invalid_xml.hurl0.005s
tests/error_multipart_form_data.hurl0s
tests/error_output_decompress.hurl0.005s
tests/error_predicate.hurl0.018s
tests/error_query_header_not_found.hurl0.005s
tests/error_query_invalid_json.hurl0.006s
tests/error_query_invalid_utf8.hurl0.006s
tests/error_template_variable_not_found.hurl0s
tests/error_template_variable_not_renderable.hurl0.006s
tests/error_timeout.hurl2.006s
tests/follow_redirect.hurl0.006s
tests/form_params.hurl0.008s
tests/headers.hurl0.014s
tests/hello.hurl0.007s
tests/multipart_form_data.hurl0.006s
tests/no_entry.hurl0s
tests/output.hurl0.007s
tests/patch.hurl0.005s
tests/post_base64.hurl0.005s
tests/post_file.hurl0.005s
tests/post_json.hurl0.017s
tests/post_multilines.hurl0.009s
tests/post_xml.hurl0.007s
tests/predicates-string.hurl0.008s
tests/put.hurl0.005s
tests/querystring_params.hurl0.011s
tests/redirect.hurl0.007s
tests/utf8.hurl0.006s
\ No newline at end of file +Hurl Report

Hurl Report

Wed, 21 Oct 2020 09:25:08 +0200
filenameduration
tests/assert_base64.hurl0.006s
tests/assert_header.hurl0.006s
tests/assert_json.hurl0.012s
tests/assert_match.hurl0.021s
tests/assert_regex.hurl0.009s
tests/assert_xpath.hurl0.006s
tests/bytes.hurl0.006s
tests/capture_and_assert.hurl0.006s
tests/captures.hurl0.011s
tests/compressed.hurl0.014s
tests/cookies.hurl0.019s
tests/cookie_storage.hurl0.007s
tests/delete.hurl0.005s
tests/empty.hurl0s
tests/encoding.hurl0.008s
tests/error_assert_base64.hurl0.006s
tests/error_assert_content_encoding.hurl0.006s
tests/error_assert_decompress.hurl0.005s
tests/error_assert_file.hurl0.005s
tests/error_assert_header_not_found.hurl0.006s
tests/error_assert_header_value.hurl0.006s
tests/error_assert_http_version.hurl0.005s
tests/error_assert_invalid_predicate_type.hurl0.007s
tests/error_assert_match_utf8.hurl0.005s
tests/error_assert_query_cookie.hurl0.009s
tests/error_assert_query_invalid_regex.hurl0.006s
tests/error_assert_query_invalid_xpath.hurl0.006s
tests/error_assert_status.hurl0.005s
tests/error_assert_template_variable_not_found.hurl0.005s
tests/error_assert_value_error.hurl0.009s
tests/error_assert_variable.hurl0.009s
tests/error_file_read_access.hurl0s
tests/error_http_connection.hurl0.028s
tests/error_invalid_jsonpath.hurl0.005s
tests/error_invalid_url.hurl0s
tests/error_invalid_xml.hurl0.005s
tests/error_multipart_form_data.hurl0s
tests/error_output_decompress.hurl0.006s
tests/error_predicate.hurl0.016s
tests/error_query_header_not_found.hurl0.005s
tests/error_query_invalid_json.hurl0.006s
tests/error_query_invalid_utf8.hurl0.006s
tests/error_template_variable_not_found.hurl0s
tests/error_template_variable_not_renderable.hurl0.006s
tests/error_timeout.hurl2.008s
tests/expect.hurl0.006s
tests/follow_redirect.hurl0.006s
tests/form_params.hurl0.008s
tests/headers.hurl0.014s
tests/hello.hurl0.007s
tests/multipart_form_data.hurl0.006s
tests/no_entry.hurl0s
tests/output.hurl0.007s
tests/patch.hurl0.006s
tests/post_base64.hurl0.005s
tests/post_file.hurl0.005s
tests/post_json.hurl0.017s
tests/post_multilines.hurl0.009s
tests/post_xml.hurl0.007s
tests/predicates-string.hurl0.009s
tests/put.hurl0.005s
tests/querystring_params.hurl0.011s
tests/redirect.hurl0.007s
tests/utf8.hurl0.006s
\ No newline at end of file diff --git a/integration/report/tests.json b/integration/report/tests.json index 6f2b912d6ec..aae9bd60dbd 100644 --- a/integration/report/tests.json +++ b/integration/report/tests.json @@ -30,7 +30,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -47,7 +47,7 @@ } ], "success": true, - "time": 5, + "time": 6, "cookies": [] }, { @@ -113,7 +113,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -201,7 +201,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -257,7 +257,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -270,7 +270,7 @@ "asserts": [ { "actual": "1.0", - "expected": "*" + "expected": "1.0" }, {} ], @@ -304,7 +304,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -358,7 +358,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -378,7 +378,7 @@ } ], "success": true, - "time": 22, + "time": 21, "cookies": [] }, { @@ -412,7 +412,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -430,7 +430,7 @@ } ], "success": true, - "time": 8, + "time": 9, "cookies": [] }, { @@ -464,7 +464,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -518,7 +518,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -535,7 +535,7 @@ } ], "success": true, - "time": 5, + "time": 6, "cookies": [] }, { @@ -569,7 +569,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -633,7 +633,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -695,7 +695,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -737,7 +737,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -814,7 +814,7 @@ } ], "success": true, - "time": 12, + "time": 11, "cookies": [] }, { @@ -848,7 +848,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -897,7 +897,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -947,7 +947,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -997,7 +997,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -1047,7 +1047,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:05 GMT" } ] }, @@ -1106,7 +1106,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1148,7 +1148,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:27 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1200,7 +1200,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1243,7 +1243,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1290,7 +1290,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1320,7 +1320,7 @@ { "name": "cookie2", "value": "", - "expires": "Tue, 20-Oct-2020 11:51:28 GMT", + "expires": "Wed, 21-Oct-2020 07:25:06 GMT", "max_age": 0, "path": "/" } @@ -1332,7 +1332,7 @@ }, { "name": "Set-Cookie", - "value": "cookie2=; Expires=Tue, 20-Oct-2020 11:51:28 GMT; Max-Age=0; Path=/" + "value": "cookie2=; Expires=Wed, 21-Oct-2020 07:25:06 GMT; Max-Age=0; Path=/" }, { "name": "Content-Length", @@ -1344,7 +1344,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1388,7 +1388,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1468,7 +1468,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1494,7 +1494,7 @@ {}, {} ], - "time": 1 + "time": 2 } ], "success": true, @@ -1505,7 +1505,7 @@ "include_subdomain": "FALSE", "path": "/", "https": "FALSE", - "expires": "1603194688", + "expires": "1603265106", "name": "cookie2", "value": "" }, @@ -1551,7 +1551,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1593,7 +1593,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1643,7 +1643,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1700,7 +1700,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1714,7 +1714,7 @@ {}, {} ], - "time": 6 + "time": 5 }, { "request": { @@ -1744,7 +1744,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1796,7 +1796,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1851,7 +1851,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1906,7 +1906,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -1957,7 +1957,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2008,7 +2008,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2025,7 +2025,7 @@ } ], "success": false, - "time": 5, + "time": 6, "cookies": [] }, { @@ -2059,7 +2059,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2110,7 +2110,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2160,7 +2160,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2211,7 +2211,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2282,7 +2282,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2357,7 +2357,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2408,7 +2408,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2459,7 +2459,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2475,7 +2475,7 @@ } ], "success": false, - "time": 6, + "time": 5, "cookies": [] }, { @@ -2509,7 +2509,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2560,7 +2560,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2614,7 +2614,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2647,7 +2647,7 @@ } ], "success": false, - "time": 8, + "time": 9, "cookies": [] }, { @@ -2715,7 +2715,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2787,7 +2787,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2855,7 +2855,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2867,11 +2867,11 @@ }, {} ], - "time": 5 + "time": 6 } ], "success": true, - "time": 5, + "time": 6, "cookies": [] }, { @@ -2905,7 +2905,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -2932,7 +2932,7 @@ } ], "success": false, - "time": 18, + "time": 16, "cookies": [] }, { @@ -2966,7 +2966,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -3017,7 +3017,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -3030,7 +3030,7 @@ {}, {} ], - "time": 6 + "time": 5 } ], "success": false, @@ -3068,7 +3068,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -3132,7 +3132,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:28 GMT" + "value": "Wed, 21 Oct 2020 07:25:06 GMT" } ] }, @@ -3196,17 +3196,72 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, "captures": [], "asserts": [], - "time": 2006 + "time": 2008 } ], "success": true, - "time": 2006, + "time": 2008, + "cookies": [] + }, + { + "filename": "tests/expect.hurl", + "entries": [ + { + "request": { + "method": "POST", + "url": "http://localhost:8000/expect", + "queryString": [], + "headers": [ + { + "name": "Expect", + "value": "100-continue" + } + ], + "cookies": [], + "body": "ZGF0YQ==" + }, + "response": { + "httpVersion": "HTTP/1.0", + "status": 200, + "cookies": [], + "headers": [ + { + "name": "Content-Type", + "value": "text/html; charset=utf-8" + }, + { + "name": "Content-Length", + "value": "0" + }, + { + "name": "Server", + "value": "Werkzeug/0.16.1 Python/3.5.3" + }, + { + "name": "Date", + "value": "Wed, 21 Oct 2020 07:25:08 GMT" + } + ] + }, + "captures": [], + "asserts": [ + { + "actual": "1.0", + "expected": "1.0" + }, + {} + ], + "time": 5 + } + ], + "success": true, + "time": 6, "cookies": [] }, { @@ -3244,7 +3299,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3313,7 +3368,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3360,7 +3415,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3410,7 +3465,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3461,7 +3516,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3512,7 +3567,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3575,7 +3630,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3587,7 +3642,7 @@ }, {} ], - "time": 2 + "time": 1 }, { "request": { @@ -3622,7 +3677,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3668,7 +3723,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3719,7 +3774,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3762,7 +3817,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3795,7 +3850,7 @@ "body": "" }, "response": { - "httpVersion": "HTTP/1.1", + "httpVersion": "HTTP/1.0", "status": 200, "cookies": [], "headers": [ @@ -3813,15 +3868,15 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, "captures": [], "asserts": [ { - "actual": "1.1", - "expected": "*" + "actual": "1.0", + "expected": "1.0" }, {} ], @@ -3979,7 +4034,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -3993,11 +4048,11 @@ {}, {} ], - "time": 5 + "time": 6 } ], "success": true, - "time": 5, + "time": 6, "cookies": [] }, { @@ -4031,7 +4086,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4081,7 +4136,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4131,7 +4186,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4173,7 +4228,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4215,7 +4270,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4257,7 +4312,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4299,7 +4354,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4341,7 +4396,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4383,7 +4438,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4430,7 +4485,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4474,7 +4529,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4516,7 +4571,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4563,7 +4618,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4613,7 +4668,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4655,7 +4710,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4705,7 +4760,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4721,7 +4776,7 @@ {}, {} ], - "time": 5 + "time": 6 }, { "request": { @@ -4751,7 +4806,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4769,7 +4824,7 @@ } ], "success": true, - "time": 8, + "time": 9, "cookies": [] }, { @@ -4803,7 +4858,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4870,7 +4925,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4882,7 +4937,7 @@ }, {} ], - "time": 6 + "time": 5 }, { "request": { @@ -4912,7 +4967,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -4967,7 +5022,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -5014,7 +5069,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -5068,7 +5123,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -5111,7 +5166,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, @@ -5161,7 +5216,7 @@ }, { "name": "Date", - "value": "Tue, 20 Oct 2020 11:51:30 GMT" + "value": "Wed, 21 Oct 2020 07:25:08 GMT" } ] }, diff --git a/integration/tests/assert_json.hurl b/integration/tests/assert_json.hurl index cf551955811..7575186e9c4 100644 --- a/integration/tests/assert_json.hurl +++ b/integration/tests/assert_json.hurl @@ -25,7 +25,7 @@ jsonpath "$.nullable" equals null } GET http://localhost:8000/assert-json/index -HTTP/* 200 +HTTP/1.0 200 [Captures] index: body diff --git a/integration/tests/expect.exit b/integration/tests/expect.exit new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/integration/tests/expect.exit @@ -0,0 +1 @@ +0 diff --git a/integration/tests/expect.hurl b/integration/tests/expect.hurl new file mode 100644 index 00000000000..6e139524a2d --- /dev/null +++ b/integration/tests/expect.hurl @@ -0,0 +1,8 @@ +POST http://localhost:8000/expect +Expect: 100-continue +```data``` + +HTTP/1.0 200 + + + diff --git a/integration/tests/expect.out b/integration/tests/expect.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/integration/tests/expect.py b/integration/tests/expect.py new file mode 100644 index 00000000000..8530ea6d64c --- /dev/null +++ b/integration/tests/expect.py @@ -0,0 +1,11 @@ +from tests import app +from flask import request + +@app.route("/expect", methods=['POST']) +def expect(): + assert request.headers['Expect'] == '100-continue' + s = request.data.decode("utf-8") + assert s == '''data''' + return '' + + diff --git a/integration/tests/multipart_form_data.hurl b/integration/tests/multipart_form_data.hurl index 88dd22ece5d..1ed700b4c9b 100644 --- a/integration/tests/multipart_form_data.hurl +++ b/integration/tests/multipart_form_data.hurl @@ -6,7 +6,7 @@ upload1: file,hello.txt; upload2: file,hello.html; upload3: file,hello.txt; text/html -HTTP/* 200 +HTTP/1.0 200 diff --git a/integration/tests/multipart_form_data.py b/integration/tests/multipart_form_data.py index e54c04ebe5d..9e7ccee10de 100644 --- a/integration/tests/multipart_form_data.py +++ b/integration/tests/multipart_form_data.py @@ -6,6 +6,7 @@ def multipart_form_data(): assert request.form['key1'] == 'value1' + assert 'Expect' not in request.headers upload1 = request.files['upload1'] assert upload1.filename == 'hello.txt' diff --git a/src/http/client.rs b/src/http/client.rs index e8392995893..a3b1d8353b5 100644 --- a/src/http/client.rs +++ b/src/http/client.rs @@ -38,6 +38,7 @@ pub enum HttpError { SSLCertificate, InvalidUrl, Timeout, + StatuslineIsMissing, Other { description: String, code: u32 }, } @@ -152,7 +153,8 @@ impl Client { }) .unwrap(); - let mut lines = vec![]; + let mut status_lines = vec![]; + let mut headers = vec![]; let mut body = Vec::::new(); { let mut transfer = self.handle.transfer(); @@ -165,7 +167,11 @@ impl Client { transfer .header_function(|h| { if let Some(s) = decode_header(h) { - lines.push(s) + if s.starts_with("HTTP/") { + status_lines.push(s); + } else { + headers.push(s) + } } true }) @@ -195,9 +201,11 @@ impl Client { } let status = self.handle.response_code().unwrap(); - let first_line = lines.remove(0); // remove the status line - let version = self.parse_response_version(first_line)?; - let headers = self.parse_response_headers(&mut lines); + let version = match status_lines.last() { + None => return Err(HttpError::StatuslineIsMissing {}), + Some(status_line) => self.parse_response_version(status_line.clone())?, + }; + let headers = self.parse_response_headers(&headers); if let Some(url) = self.get_follow_location(headers.clone()) { let request = Request { @@ -289,6 +297,10 @@ impl Client { } } + if get_header_values(request.headers.clone(), "Expect".to_string()).is_empty() { + list.append("Expect:").unwrap(); // remove header Expect + } + // if request.form.is_empty() && request.multipart.is_empty() && request.body.is_empty() { // list.append("Content-Length:").unwrap(); // } @@ -391,9 +403,8 @@ impl Client { /// /// parse headers from libcurl responses /// - fn parse_response_headers(&mut self, lines: &mut Vec) -> Vec
{ + fn parse_response_headers(&mut self, lines: &[String]) -> Vec
{ let mut headers: Vec
= vec![]; - lines.pop(); // remove the blank line between headers and body for line in lines { if let Some(header) = Header::parse(line.to_string()) { headers.push(header); diff --git a/src/runner/entry.rs b/src/runner/entry.rs index 1f7fa782949..f36ab75ff99 100644 --- a/src/runner/entry.rs +++ b/src/runner/entry.rs @@ -110,6 +110,10 @@ pub fn run( HttpError::CouldNotParseResponse => RunnerError::CouldNotParseResponse, HttpError::SSLCertificate => RunnerError::SSLCertificate, HttpError::InvalidUrl => RunnerError::InvalidURL(http_request.url.clone()), + HttpError::StatuslineIsMissing => RunnerError::HttpConnection { + message: "status line is missing".to_string(), + url: http_request.url.clone(), + }, HttpError::Other { description, .. } => RunnerError::HttpConnection { message: description, url: http_request.url.clone(), diff --git a/tests/libcurl.rs b/tests/libcurl.rs index 236b0a19125..cdf6957db75 100644 --- a/tests/libcurl.rs +++ b/tests/libcurl.rs @@ -427,6 +427,29 @@ fn test_post_bytes() { // endregion +#[test] +fn test_expect() { + let mut client = default_client(); + let request = Request { + method: Method::Post, + url: "http://localhost:8000/expect".to_string(), + headers: vec![Header { + name: "Expect".to_string(), + value: "100-continue".to_string(), + }], + querystring: vec![], + form: vec![], + multipart: vec![], + cookies: vec![], + body: b"data".to_vec(), + content_type: None, + }; + let response = client.execute(&request, 0).unwrap(); + assert_eq!(response.status, 200); + assert_eq!(response.version, Version::Http10); + assert!(response.body.is_empty()); +} + // region error #[test]