Update werkzeug from 2.0.3 to 2.2.3

This update solves security issue but bumps HTTP Flask version from HTTP/1.0 to HTTP/1.1.
This commit is contained in:
jcamiel 2023-02-16 13:04:41 +01:00
parent 3ec8a15122
commit daa5e5ebd4
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC
25 changed files with 202 additions and 138 deletions

View File

@ -19,14 +19,14 @@ Jinja2==3.1.2
kaitaistruct==0.9
ldap3==2.9.1
lxml==4.9.1
MarkupSafe==2.1.1
MarkupSafe==2.1.2
mitmproxy==8.0.0
msgpack==1.0.4
mypy==0.971
mypy-extensions==0.4.3
mypy-extensions==1.0.0
passlib==1.7.4
pathspec==0.10.1
platformdirs==2.5.2
pathspec==0.11.0
platformdirs==3.0.0
protobuf==3.19.6
publicsuffix2==2.20191221
pyasn1==0.4.8
@ -38,12 +38,12 @@ requests==2.28.1
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.7
sortedcontainers==2.4.0
soupsieve==2.3.2.post1
soupsieve==2.4
tomli==2.0.1
tornado==6.2
typing_extensions==4.4.0
urllib3==1.26.12
typing_extensions==4.5.0
urllib3==1.26.14
urwid==2.1.2
Werkzeug==2.0.3
Werkzeug==2.2.3
wsproto==1.1.0
zstandard==0.17.0

View File

@ -5,4 +5,4 @@ lxml==4.9.1
mitmproxy==8.0.0
mypy==0.971
requests==2.28.1
Werkzeug==2.0.3
Werkzeug==2.2.3

View File

@ -2,6 +2,6 @@ error: Assert HTTP version
--> tests_failed/assert_http_version.hurl:2:1
|
2 | HTTP/2 200
| ^^^^^^ actual value is <HTTP/1.0>
| ^^^^^^ actual value is <HTTP/1.1>
|

View File

@ -1 +1 @@
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Invalid decoding\n --> tests_failed/assert_match_utf8.hurl:4:1\n |\n 4 | body matches \".*\"\n | ^^^^ the body can not be decoded with charset 'utf-8'\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/error-assert/match-utf8"},"response":{"cookies":[],"headers":[{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"1"},{"name":"Server","value":"Flask Server"},{"name":"Date","value":"~~~"}],"httpVersion":"HTTP/1.0","status":200}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_failed/assert_match_utf8.hurl","success":false,"time":~~~}
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Invalid decoding\n --> tests_failed/assert_match_utf8.hurl:4:1\n |\n 4 | body matches \".*\"\n | ^^^^ the body can not be decoded with charset 'utf-8'\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/error-assert/match-utf8"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/~~~ Python/~~~"},{"name":"Date","value":"~~~"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"1"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"httpVersion":"HTTP/1.1","status":200}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_failed/assert_match_utf8.hurl","success":false,"time":~~~}

View File

@ -1 +1 @@
{"cookies":[],"entries":[{"asserts":[{"line":9,"success":true},{"line":9,"message":"Assert status code\n --> tests_failed/assert_status.hurl:9:6\n |\n 9 | HTTP 200\n | ^^^ actual value is <404>\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/not_found"},"response":{"cookies":[],"headers":[{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"232"},{"name":"Server","value":"Flask Server"},{"name":"Date","value":"~~~"}],"httpVersion":"HTTP/1.0","status":404}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_failed/assert_status.hurl","success":false,"time":~~~}
{"cookies":[],"entries":[{"asserts":[{"line":9,"success":true},{"line":9,"message":"Assert status code\n --> tests_failed/assert_status.hurl:9:6\n |\n 9 | HTTP 200\n | ^^^ actual value is <404>\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/not_found"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/~~~ Python/~~~"},{"name":"Date","value":"~~~"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"207"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"httpVersion":"HTTP/1.1","status":404}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_failed/assert_status.hurl","success":false,"time":~~~}

View File

@ -1 +1 @@
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Undefined variable\n --> tests_failed/assert_template_variable_not_found.hurl:4:33\n |\n 4 | header \"content-type\" equals \"{{content_type}}\"\n | ^^^^^^^^^^^^ you must set the variable content_type\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/error-assert-template-variable-not-found"},"response":{"cookies":[],"headers":[{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"0"},{"name":"Server","value":"Flask Server"},{"name":"Date","value":"~~~"}],"httpVersion":"HTTP/1.0","status":200}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_failed/assert_template_variable_not_found.hurl","success":false,"time":~~~}
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Undefined variable\n --> tests_failed/assert_template_variable_not_found.hurl:4:33\n |\n 4 | header \"content-type\" equals \"{{content_type}}\"\n | ^^^^^^^^^^^^ you must set the variable content_type\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/error-assert-template-variable-not-found"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/~~~ Python/~~~"},{"name":"Date","value":"~~~"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"0"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"httpVersion":"HTTP/1.1","status":200}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_failed/assert_template_variable_not_found.hurl","success":false,"time":~~~}

View File

@ -1 +1 @@
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:4:0\n |\n 4 | header \"content-type\" equals \"XXX\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <XXX>\n |","success":false},{"line":5,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:5:0\n |\n 5 | header \"content-type\" notEquals \"text/html; charset=utf-8\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <text/html; charset=utf-8>\n |","success":false},{"line":6,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:6:0\n |\n 6 | jsonpath \"$.id\" equals \"000001\"\n | actual: none\n | expected: string <000001>\n |","success":false},{"line":7,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:7:0\n |\n 7 | jsonpath \"$.values\" includes 100\n | actual: [int <1>, int <2>, int <3>]\n | expected: includes int <100>\n |","success":false},{"line":8,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:8:0\n |\n 8 | jsonpath \"$.values\" not contains \"Hello\"\n | actual: [int <1>, int <2>, int <3>]\n | expected: not contains string <Hello>\n | >>> types between actual and expected are not consistent\n |","success":false},{"line":9,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:9:0\n |\n 9 | jsonpath \"$.count\" greaterThan 5\n | actual: int <2>\n | expected: greater than int <5>\n |","success":false},{"line":10,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:10:0\n |\n10 | jsonpath \"$.count\" isFloat\n | actual: int <2>\n | expected: float\n |","success":false},{"line":11,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:11:0\n |\n11 | bytes contains hex,00;\n | actual: byte array <7b202276616c756573223a205b312c322c335d2c2022636f756e74223a20327d>\n | expected: contains byte array <00>\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/error-assert-value"},"response":{"cookies":[],"headers":[{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"32"},{"name":"Server","value":"Flask Server"},{"name":"Date","value":"~~~"}],"httpVersion":"HTTP/1.0","status":200}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_failed/assert_value_error.hurl","success":false,"time":~~~}
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:4:0\n |\n 4 | header \"content-type\" equals \"XXX\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <XXX>\n |","success":false},{"line":5,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:5:0\n |\n 5 | header \"content-type\" notEquals \"text/html; charset=utf-8\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <text/html; charset=utf-8>\n |","success":false},{"line":6,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:6:0\n |\n 6 | jsonpath \"$.id\" equals \"000001\"\n | actual: none\n | expected: string <000001>\n |","success":false},{"line":7,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:7:0\n |\n 7 | jsonpath \"$.values\" includes 100\n | actual: [int <1>, int <2>, int <3>]\n | expected: includes int <100>\n |","success":false},{"line":8,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:8:0\n |\n 8 | jsonpath \"$.values\" not contains \"Hello\"\n | actual: [int <1>, int <2>, int <3>]\n | expected: not contains string <Hello>\n | >>> types between actual and expected are not consistent\n |","success":false},{"line":9,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:9:0\n |\n 9 | jsonpath \"$.count\" greaterThan 5\n | actual: int <2>\n | expected: greater than int <5>\n |","success":false},{"line":10,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:10:0\n |\n10 | jsonpath \"$.count\" isFloat\n | actual: int <2>\n | expected: float\n |","success":false},{"line":11,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:11:0\n |\n11 | bytes contains hex,00;\n | actual: byte array <7b202276616c756573223a205b312c322c335d2c2022636f756e74223a20327d>\n | expected: contains byte array <00>\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/error-assert-value"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/~~~ Python/~~~"},{"name":"Date","value":"~~~"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"32"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"httpVersion":"HTTP/1.1","status":200}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_failed/assert_value_error.hurl","success":false,"time":~~~}

View File

@ -26,13 +26,15 @@
> Accept: */*
> User-Agent: hurl/~~~
>
* Response: (received 232 bytes in ~~~ ms)
* Response: (received 207 bytes in ~~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< Content-Type: text/html; charset=utf-8
< Content-Length: 232
< Server: Flask Server
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 207
< Server: Flask Server
< Connection: close
<
*
* Assert status code
@ -64,13 +66,15 @@
> Accept: */*
> User-Agent: hurl/~~~
>
* Response: (received 232 bytes in ~~~ ms)
* Response: (received 207 bytes in ~~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< Content-Type: text/html; charset=utf-8
< Content-Length: 232
< Server: Flask Server
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 207
< Server: Flask Server
< Connection: close
<
*
* Assert status code
@ -102,13 +106,15 @@
> Accept: */*
> User-Agent: hurl/~~~
>
* Response: (received 232 bytes in ~~~ ms)
* Response: (received 207 bytes in ~~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< Content-Type: text/html; charset=utf-8
< Content-Length: 232
< Server: Flask Server
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 207
< Server: Flask Server
< Connection: close
<
*
*

View File

@ -1 +1 @@
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"message":"Header not found\n --> tests_failed/query_header_not_found.hurl:3:1\n |\n 3 | Custom: XXX\n | ^^^^^^ this header has not been found in the response\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/error-query-header-not-found"},"response":{"cookies":[],"headers":[{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Date","value":"~~~"}],"httpVersion":"HTTP/1.0","status":200}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_failed/query_header_not_found.hurl","success":false,"time":~~~}
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"message":"Header not found\n --> tests_failed/query_header_not_found.hurl:3:1\n |\n 3 | Custom: XXX\n | ^^^^^^ this header has not been found in the response\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/error-query-header-not-found"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/~~~ Python/~~~"},{"name":"Date","value":"~~~"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"httpVersion":"HTTP/1.1","status":200}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_failed/query_header_not_found.hurl","success":false,"time":~~~}

View File

@ -21,13 +21,15 @@
> Accept: */*
> User-Agent: hurl/~~~
>
* Response: (received 232 bytes in ~~~ ms)
* Response: (received 207 bytes in ~~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< Content-Type: text/html; charset=utf-8
< Content-Length: 232
< Server: Flask Server
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 207
< Server: Flask Server
< Connection: close
<
*
* Assert status code
@ -54,13 +56,15 @@
> Accept: */*
> User-Agent: hurl/~~~
>
* Response: (received 232 bytes in ~~~ ms)
* Response: (received 207 bytes in ~~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< Content-Type: text/html; charset=utf-8
< Content-Length: 232
< Server: Flask Server
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 207
< Server: Flask Server
< Connection: close
<
*
* Assert status code
@ -87,13 +91,15 @@
> Accept: */*
> User-Agent: hurl/~~~
>
* Response: (received 232 bytes in ~~~ ms)
* Response: (received 207 bytes in ~~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< Content-Type: text/html; charset=utf-8
< Content-Length: 232
< Server: Flask Server
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 207
< Server: Flask Server
< Connection: close
<
*
* Assert status code
@ -120,13 +126,15 @@
> Accept: */*
> User-Agent: hurl/~~~
>
* Response: (received 232 bytes in ~~~ ms)
* Response: (received 207 bytes in ~~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< Content-Type: text/html; charset=utf-8
< Content-Length: 232
< Server: Flask Server
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 207
< Server: Flask Server
< Connection: close
<
*
* Assert status code
@ -153,13 +161,15 @@
> Accept: */*
> User-Agent: hurl/~~~
>
* Response: (received 232 bytes in ~~~ ms)
* Response: (received 207 bytes in ~~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< Content-Type: text/html; charset=utf-8
< Content-Length: 232
< Server: Flask Server
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 207
< Server: Flask Server
< Connection: close
<
*
* Assert status code
@ -186,13 +196,15 @@
> Accept: */*
> User-Agent: hurl/~~~
>
* Response: (received 232 bytes in ~~ ms)
* Response: (received 207 bytes in ~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< Content-Type: text/html; charset=utf-8
< Content-Length: 232
< Server: Flask Server
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 207
< Server: Flask Server
< Connection: close
<
*
*

View File

@ -1 +1 @@
{"cookies":[{"domain":"localhost","expires":"0","https":"FALSE","include_subdomain":"FALSE","name":"cookie1","path":"/","value":"value1"},{"domain":"localhost","expires":"0","https":"FALSE","include_subdomain":"FALSE","name":"cookie2","path":"/","value":"value2"},{"domain":"localhost","expires":"0","https":"FALSE","include_subdomain":"FALSE","name":"cookie3","path":"/","value":"value3"}],"entries":[{"asserts":[{"line":3,"success":true},{"line":3,"success":true},{"line":4,"success":true},{"line":5,"success":true},{"line":6,"success":true},{"line":8,"success":true},{"line":9,"success":true},{"line":10,"success":true},{"line":11,"success":true},{"line":12,"success":true},{"line":13,"success":true},{"line":14,"success":true},{"line":15,"success":true},{"line":16,"success":true},{"line":17,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/2.1.0-SNAPSHOT"}],"method":"GET","queryString":[],"url":"http://localhost:8000/assert-header"},"response":{"cookies":[{"name":"cookie1","path":"/","value":"value1"},{"name":"cookie2","path":"/","value":"value2"},{"name":"cookie3","path":"/","value":"value3"}],"headers":[{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Header1","value":"value1"},{"name":"ETag","value":"\"33a64df551425fcc55e4d42a148795d9f25f89d4\""},{"name":"Expires","value":"Wed, 21 Oct 2015 07:28:00 GMT"},{"name":"Set-Cookie","value":"cookie1=value1; Path=/"},{"name":"Set-Cookie","value":"cookie2=value2; Path=/"},{"name":"Set-Cookie","value":"cookie3=value3; Path=/"},{"name":"Server","value":"Flask Server"},{"name":"Content-Length","value":"0"},{"name":"Date","value":"~~~"}],"httpVersion":"HTTP/1.0","status":200}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_ok/assert_header.hurl","success":true,"time":~~~}
{"cookies":[{"domain":"localhost","expires":"0","https":"FALSE","include_subdomain":"FALSE","name":"cookie1","path":"/","value":"value1"},{"domain":"localhost","expires":"0","https":"FALSE","include_subdomain":"FALSE","name":"cookie2","path":"/","value":"value2"},{"domain":"localhost","expires":"0","https":"FALSE","include_subdomain":"FALSE","name":"cookie3","path":"/","value":"value3"}],"entries":[{"asserts":[{"line":3,"success":true},{"line":3,"success":true},{"line":4,"success":true},{"line":5,"success":true},{"line":6,"success":true},{"line":8,"success":true},{"line":9,"success":true},{"line":10,"success":true},{"line":11,"success":true},{"line":12,"success":true},{"line":13,"success":true},{"line":14,"success":true},{"line":15,"success":true},{"line":16,"success":true},{"line":17,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"http://localhost:8000/assert-header"},"response":{"cookies":[{"name":"cookie1","path":"/","value":"value1"},{"name":"cookie2","path":"/","value":"value2"},{"name":"cookie3","path":"/","value":"value3"}],"headers":[{"name":"Server","value":"Werkzeug/~~~ Python/~~~"},{"name":"Date","value":"~~~"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Header1","value":"value1"},{"name":"ETag","value":"\"33a64df551425fcc55e4d42a148795d9f25f89d4\""},{"name":"Expires","value":"~~~"},{"name":"Set-Cookie","value":"cookie1=value1; Path=/"},{"name":"Set-Cookie","value":"cookie2=value2; Path=/"},{"name":"Set-Cookie","value":"cookie3=value3; Path=/"},{"name":"Server","value":"Flask Server"},{"name":"Content-Length","value":"0"},{"name":"Connection","value":"close"}],"httpVersion":"HTTP/1.1","status":200}}],"captures":[],"index":1,"time":~~~}],"filename":"tests_ok/assert_header.hurl","success":true,"time":~~~}

View File

@ -1,9 +1,9 @@
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-status-code</span></span>
</span><span class="response"><span class="line"><span class="version">HTTP</span> <span class="number">201</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span><span class="comment"># Assert HTTP 1.0</span>
<span class="line"></span><span class="comment"># Assert HTTP 1.1</span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-status-code</span></span>
</span><span class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="number">201</span></span>
</span><span class="response"><span class="line"><span class="version">HTTP/1.1</span> <span class="number">201</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span><span class="comment"># Simply check that the status code is not 200</span>
<span class="line"></span><span class="comment"># Do not run implicit assert of HTTP response version and code</span>

View File

@ -1,9 +1,9 @@
GET http://localhost:8000/assert-status-code
HTTP 201
# Assert HTTP 1.0
# Assert HTTP 1.1
GET http://localhost:8000/assert-status-code
HTTP/1.0 201
HTTP/1.1 201
# Simply check that the status code is not 200
# Do not run implicit assert of HTTP response version and code

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/assert-status-code"},"response":{"status":201}},{"request":{"method":"GET","url":"http://localhost:8000/assert-status-code"},"response":{"version":"HTTP/1.0","status":201}},{"request":{"method":"GET","url":"http://localhost:8000/assert-status-code"},"response":{"asserts":[{"query":{"type":"status"},"predicate":{"type":"not-equal","value":200}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-status-code"},"response":{"asserts":[{"query":{"type":"status"},"predicate":{"type":"greater-or-equal","value":200}},{"query":{"type":"status"},"predicate":{"type":"less","value":300}}]}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/assert-status-code"},"response":{"status":201}},{"request":{"method":"GET","url":"http://localhost:8000/assert-status-code"},"response":{"version":"HTTP/1.1","status":201}},{"request":{"method":"GET","url":"http://localhost:8000/assert-status-code"},"response":{"asserts":[{"query":{"type":"status"},"predicate":{"type":"not-equal","value":200}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-status-code"},"response":{"asserts":[{"query":{"type":"status"},"predicate":{"type":"greater-or-equal","value":200}},{"query":{"type":"status"},"predicate":{"type":"less","value":300}}]}}]}

View File

@ -1,7 +1,9 @@
HTTP/1.0 200
HTTP/1.1 200
Server: Werkzeug/~~~ Python/~~~
Date: ~~~
Content-Type: text/html; charset=utf-8
Content-Length: 5
Server: Flask Server
Date: ~~~
Connection: close
Hello

File diff suppressed because one or more lines are too long

View File

@ -23,11 +23,13 @@
>
* Response: (received 60 bytes in ~~~ ms)
*
< HTTP/1.0 201 CREATED
< HTTP/1.1 201 CREATED
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 60
< Server: Flask Server
< Date: ~~~
< Connection: close
<
* Captures:
* job_id: ~~~
@ -54,11 +56,13 @@
>
* Response: (received 60 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 60
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* Assert failure
@ -92,11 +96,13 @@
>
* Response: (received 60 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 60
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* Assert failure
@ -130,11 +136,13 @@
>
* Response: (received 60 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 60
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* Assert failure
@ -168,11 +176,13 @@
>
* Response: (received 60 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 60
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* Assert failure
@ -206,11 +216,13 @@
>
* Response: (received 62 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 62
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* ------------------------------------------------------------------------------
@ -231,11 +243,13 @@
>
* Response: (received 0 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Server: Flask Server
< Content-Length: 0
< Date: ~~~
< Connection: close
<
*
* ------------------------------------------------------------------------------
@ -256,10 +270,12 @@
>
* Response: (received 42 bytes in ~~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 42
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*

File diff suppressed because one or more lines are too long

View File

@ -19,11 +19,13 @@
>
* Response: (received 12 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 12
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* ------------------------------------------------------------------------------
@ -51,15 +53,16 @@
* Request body:
*
** Mark bundle as not supporting multiuse
** HTTP 1.0, assume close after body
** Closing connection 3
* Response: (received 12 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 12
< Server: Flask Server
< Date: ~~~
< Connection: close
<
* Response body:
* Hello World!

View File

@ -23,11 +23,13 @@
>
* Response: (received 60 bytes in ~~~ ms)
*
< HTTP/1.0 201 CREATED
< HTTP/1.1 201 CREATED
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 60
< Server: Flask Server
< Date: ~~~
< Connection: close
<
* Captures:
* job_id: ~~~
@ -50,11 +52,13 @@
>
* Response: (received 60 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 60
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* Assert failure
@ -84,11 +88,13 @@
>
* Response: (received 60 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 60
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* Assert failure
@ -118,11 +124,13 @@
>
* Response: (received 60 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 60
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* Assert failure
@ -152,11 +160,13 @@
>
* Response: (received 60 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 60
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* Assert failure
@ -186,11 +196,13 @@
>
* Response: (received 62 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 62
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*
* ------------------------------------------------------------------------------
@ -211,11 +223,13 @@
>
* Response: (received 0 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Server: Flask Server
< Content-Length: 0
< Date: ~~~
< Connection: close
<
*
* ------------------------------------------------------------------------------
@ -236,10 +250,12 @@
>
* Response: (received 42 bytes in ~~~ ms)
*
< HTTP/1.0 404 NOT FOUND
< HTTP/1.1 404 NOT FOUND
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: application/json
< Content-Length: 42
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*

File diff suppressed because one or more lines are too long

View File

@ -23,10 +23,12 @@
>
* Response: (received 12 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 12
< Server: Flask Server
< Date: ~~~
< Connection: close
<
*

View File

@ -26,16 +26,17 @@
* Request body:
*
** Mark bundle as not supporting multiuse
** HTTP 1.0, assume close after body
** Closing connection 0
* Response: (received 205 bytes in ~~~ ms)
*
< HTTP/1.0 301 MOVED PERMANENTLY
< HTTP/1.1 301 MOVED PERMANENTLY
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 205
< Location: http://localhost:8000/very-verbose/redirected
< Location: /very-verbose/redirected
< Server: Flask Server
< Date: ~~~
< Connection: close
<
* Response body:
* <html>
@ -63,15 +64,16 @@
* Request body:
*
** Mark bundle as not supporting multiuse
** HTTP 1.0, assume close after body
** Closing connection 1
* Response: (received 11 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 11
< Server: Flask Server
< Date: ~~~
< Connection: close
<
* Response body:
* Redirected.
@ -98,15 +100,16 @@
* Request body:
*
** Mark bundle as not supporting multiuse
** HTTP 1.0, assume close after body
** Closing connection 2
* Response: (received 4 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=ISO-8859-1
< Content-Length: 4
< Server: Flask Server
< Date: ~~~
< Connection: close
<
* Response body:
* café
@ -143,16 +146,17 @@
* }
** We are completely uploaded and fine
** Mark bundle as not supporting multiuse
** HTTP 1.0, assume close after body
** Closing connection 3
* Response: (received 17 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 17
< Content-Encoding: br
< Server: Flask Server
< Date: ~~~
< Connection: close
<
* Response body:
* Hello World!
@ -179,15 +183,16 @@
* Request body:
*
** Mark bundle as not supporting multiuse
** HTTP 1.0, assume close after body
** Closing connection 4
* Response: (received 25992 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: image/jpeg
< Content-Length: 25992
< Server: Flask Server
< Date: ~~~
< Connection: close
<
* Response body:
* Bytes <f198388ba26c2c53005f24643826384f15ba905b8ca070a470b61885c6639f8bbfe63fcee5fb498a630249e499e4eddcc9ca793406c14d02c97107e09c7af57a...>
@ -221,15 +226,16 @@
* Bytes <~~~~~...>
** We are completely uploaded and fine
** Mark bundle as not supporting multiuse
** HTTP 1.0, assume close after body
** Closing connection 5
* Response: (received 0 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 0
< Server: Flask Server
< Date: ~~~
< Connection: close
<
* Response body:
*
@ -258,15 +264,16 @@
* Request body:
*
** Mark bundle as not supporting multiuse
** HTTP 1.0, assume close after body
** Closing connection 6
* Response: (received 4 bytes in ~~~ ms)
*
< HTTP/1.0 200 OK
< HTTP/1.1 200 OK
< Server: Werkzeug/~~~ Python/~~~
< Date: ~~~
< Content-Type: text/html; charset=utf-8
< Content-Length: 4
< Server: Flask Server
< Date: ~~~
< Connection: close
<
* Response body:
* Done

View File

@ -54,7 +54,7 @@ use super::entry;
/// let filename = "sample.hurl";
/// let s = r#"
/// GET http://localhost:8000/hello
/// HTTP/1.0 200
/// HTTP/1.1 200
/// "#;
/// let hurl_file = parser::parse_hurl_file(s).unwrap();
///

View File

@ -63,11 +63,11 @@ fn test_hello() {
value: "*/*".to_string(),
}));
assert_eq!(response.version, Version::Http10);
assert_eq!(response.version, Version::Http11);
assert_eq!(response.status, 200);
assert_eq!(response.body, b"Hello World!".to_vec());
assert_eq!(response.headers.len(), 4);
assert_eq!(response.headers.len(), 6);
assert!(response.headers.contains(&Header {
name: "Content-Length".to_string(),
value: "12".to_string(),
@ -565,7 +565,7 @@ fn test_expect() {
value: "100-continue".to_string(),
}));
assert_eq!(response.status, 200);
assert_eq!(response.version, Version::Http10);
assert_eq!(response.version, Version::Http11);
assert!(response.body.is_empty());
}
@ -592,7 +592,7 @@ fn test_basic_authentication() {
value: "Basic Ym9iQGVtYWlsLmNvbTpzZWNyZXQ=".to_string(),
}));
assert_eq!(response.status, 200);
assert_eq!(response.version, Version::Http10);
assert_eq!(response.version, Version::Http11);
assert_eq!(response.body, b"You are authenticated".to_vec());
let options = ClientOptions::default();
@ -609,7 +609,7 @@ fn test_basic_authentication() {
value: "Basic Ym9iQGVtYWlsLmNvbTpzZWNyZXQ=".to_string(),
}));
assert_eq!(response.status, 200);
assert_eq!(response.version, Version::Http10);
assert_eq!(response.version, Version::Http11);
assert_eq!(response.body, b"You are authenticated".to_vec());
}