Skip to content

Commit d1c0b8a

Browse files
authored
fix curl of test.t on CI (#432)
* add `connection: keep-alive` to test.t * --no-keepalive * -H "Connection: close" * -H "Connection:" * --http1.0 * grep -v 'connection: '
1 parent 13ecd6b commit d1c0b8a

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

example/ex01/test/test.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Check endpoints
3030

3131
Check endpoints
3232
$ curl -si localhost:$PORT/student/from-person \
33-
> -d '{"kind":"with-id","value":0}'
33+
> -d '{"kind":"with-id","value":0}' \
34+
> | grep -v 'connection: '
3435
HTTP/1.1 422 Status 422
3536
Content-Type: application/json
3637
content-length: 22
@@ -39,7 +40,8 @@ Check endpoints
3940

4041
Check endpoints
4142
$ curl -si localhost:$PORT/student/from-person \
42-
> -d '{"kind":"student","studentId":0}'
43+
> -d '{"kind":"student","studentId":0}' \
44+
> | grep -v 'connection: '
4345
HTTP/1.1 400 Status 400
4446
Content-Type: application/json
4547
content-length: 1611

example/ex02/test/test.t

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ Start the client program.
5757
status = `Unpaid }
5858

5959
Check endpoints
60-
$ curl -si localhost:$PORT/orders/get \
61-
> -d '{"products": [0, 2, 5, 9]}'
60+
$ curl -si localhost:$PORT/orders/get \
61+
> -d '{"products": [0, 2, 5, 9]}' \
62+
> | grep -v 'connection: '
6263
HTTP/1.1 200 Status 200
6364
Content-Type: application/json
6465
content-length: 281
@@ -67,7 +68,8 @@ Check endpoints
6768

6869
Check endpoints
6970
$ curl -si localhost:8082/order/status/update \
70-
> -d '{"_0": 10, "_1": "Shipped"}'
71+
> -d '{"_0": 10, "_1": "Shipped"}' \
72+
> | grep -v 'connection: '
7173
HTTP/1.1 400 Status 400
7274
Content-Type: application/json
7375
content-length: 22
@@ -76,7 +78,8 @@ Check endpoints
7678

7779
Check endpoints
7880
$ curl -si localhost:8082/product/details/update \
79-
> -d '{ "_0": 0, _1: { "price": 1000 } }'
81+
> -d '{ "_0": 0, _1: { "price": 1000 } }' \
82+
> | grep -v 'connection: '
8083
HTTP/1.1 400 Status 400
8184
Content-Type: application/json
8285
content-length: 1547

0 commit comments

Comments
 (0)