Damien Neil
3222951439
[release-branch.go1.22] net/http: send body or close connection on expect-100-continue requests
...
When sending a request with an "Expect: 100-continue" header,
we must send the request body before sending any further requests
on the connection.
When receiving a non-1xx response to an "Expect: 100-continue" request,
send the request body if the connection isn't being closed after
processing the response. In other words, if either the request
or response contains a "Connection: close" header, then skip sending
the request body (because the connection will not be used for
further requests), but otherwise send it.
Correct a comment on the server-side Expect: 100-continue handling
that implied sending the request body is optional. It isn't.
For #67555
Fixes #68200
Change-Id: Ia2f12091bee697771087f32ac347509ec5922d54
Reviewed-on: https://go-review.googlesource.com/c/go/+/591255
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
(cherry picked from commit cf501e05e138e6911f759a5db786e90b295499b9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/595235
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Joedian Reid <joedian@google.com>
2024-06-26 22:21:31 +00:00
..
2024-06-26 22:21:31 +00:00
2024-01-10 03:29:50 +00:00
2024-02-28 19:10:13 +00:00
2024-06-04 17:17:27 +00:00
2024-01-10 03:29:50 +00:00
2024-01-10 03:29:50 +00:00
2022-11-10 18:29:14 +00:00
2024-03-05 16:43:51 +00:00
2024-01-10 03:29:50 +00:00
2022-09-05 07:16:00 +00:00
2022-11-04 22:36:12 +00:00
2021-10-28 18:17:57 +00:00
2021-10-28 18:17:57 +00:00
2022-11-07 21:05:53 +00:00
2022-11-07 21:05:53 +00:00
2021-10-28 18:17:57 +00:00
2021-10-28 18:17:57 +00:00
2021-10-28 18:17:57 +00:00
2022-11-01 14:05:39 +00:00
2021-10-28 18:17:57 +00:00
2021-10-28 18:17:57 +00:00
2022-11-01 14:05:39 +00:00
2021-10-28 18:17:57 +00:00
2023-09-18 17:20:52 +00:00
2023-05-16 16:01:08 +00:00
2022-11-08 20:59:42 +00:00
2022-11-08 20:59:42 +00:00
2023-09-28 13:41:21 +00:00
2023-09-28 13:41:21 +00:00
2023-05-04 16:28:59 +00:00
2023-10-11 22:40:01 +00:00
2023-05-11 23:49:19 +00:00
2023-11-20 15:56:08 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2022-03-29 16:24:51 +00:00
2024-01-10 03:29:50 +00:00
2020-10-12 16:30:11 +00:00
2024-06-12 20:58:33 +00:00
2024-06-12 20:58:33 +00:00
2023-12-05 20:34:30 +00:00
2022-11-03 17:41:32 +00:00
2023-09-18 17:20:52 +00:00
2023-06-02 16:58:42 +00:00
2022-11-01 22:44:57 +00:00
2023-09-18 17:20:52 +00:00
2023-08-31 16:59:22 +00:00
2021-10-28 18:17:57 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-08-31 16:59:22 +00:00
2023-04-11 20:54:12 +00:00
2023-08-31 16:59:22 +00:00
2021-10-13 16:36:59 +00:00
2023-09-18 17:20:52 +00:00
2023-11-20 15:56:08 +00:00
2023-09-18 17:20:52 +00:00
2022-03-29 16:24:51 +00:00
2023-05-24 20:19:46 +00:00
2023-09-18 17:20:52 +00:00
2023-09-01 15:17:54 +00:00
2022-11-10 18:46:00 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-05-22 16:48:53 +00:00
2022-11-10 18:46:00 +00:00
2023-06-13 21:06:56 +00:00
2023-06-12 23:11:39 +00:00
2019-10-09 06:14:44 +00:00
2023-09-04 07:21:38 +00:00
2023-09-18 17:20:52 +00:00
2023-09-04 07:21:38 +00:00
2023-09-04 07:21:38 +00:00
2023-09-04 07:21:38 +00:00
2023-09-04 07:21:38 +00:00
2022-08-27 05:42:03 +00:00
2021-10-28 18:17:57 +00:00
2022-08-27 05:42:03 +00:00
2021-10-28 18:17:57 +00:00
2021-10-02 16:05:55 +00:00
2022-08-27 05:42:03 +00:00
2022-08-27 05:42:03 +00:00
2022-08-27 05:42:03 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-07-18 23:51:35 +00:00
2022-08-27 05:42:03 +00:00
2024-01-10 03:29:50 +00:00
2023-09-18 17:20:52 +00:00
2024-01-10 03:29:50 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2024-01-10 03:29:50 +00:00
2020-07-07 23:03:29 +00:00
2023-08-29 20:38:53 +00:00
2023-09-18 17:20:52 +00:00
2023-09-15 12:57:52 +00:00
2023-09-18 17:20:52 +00:00
2023-10-23 09:03:09 +00:00
2023-10-23 09:03:09 +00:00
2023-09-18 17:20:52 +00:00
2022-09-07 00:49:41 +00:00
2023-10-23 09:03:09 +00:00
2024-01-10 03:29:50 +00:00
2022-04-11 16:34:30 +00:00
2022-05-03 14:38:32 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2022-03-29 16:24:51 +00:00
2023-09-18 17:20:52 +00:00
2023-07-20 18:36:30 +00:00
2023-09-18 17:20:52 +00:00
2023-07-11 00:36:57 +00:00
2023-05-24 18:48:34 +00:00
2023-04-18 13:48:22 +00:00
2023-09-18 17:20:52 +00:00
2024-02-28 19:44:18 +00:00
2023-09-18 17:20:52 +00:00
2022-03-31 21:21:20 +00:00
2024-06-12 20:58:33 +00:00
2023-04-27 22:26:09 +00:00
2023-04-27 22:26:09 +00:00
2023-04-27 22:26:09 +00:00
2023-04-27 22:26:09 +00:00
2023-04-27 22:26:09 +00:00
2022-11-15 20:15:51 +00:00
2022-11-15 20:15:51 +00:00
2023-09-18 17:20:52 +00:00
2023-04-11 20:54:12 +00:00
2023-09-15 12:57:52 +00:00
2024-01-10 03:29:50 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2022-03-29 16:24:51 +00:00
2020-08-18 08:47:18 +00:00
2024-01-10 03:29:50 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-11-17 23:16:28 +00:00
2023-02-28 04:49:22 +00:00
2023-09-18 17:20:52 +00:00
2023-10-23 18:44:26 +00:00
2023-10-23 18:44:26 +00:00
2019-09-26 06:16:42 +00:00
2023-09-18 17:20:52 +00:00
2021-10-28 18:17:57 +00:00
2023-06-09 04:04:07 +00:00
2022-09-03 18:39:45 +00:00
2022-09-03 18:39:45 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2024-01-08 18:52:56 +00:00
2023-09-18 17:20:52 +00:00
2020-05-09 00:33:27 +00:00
2021-10-28 18:17:57 +00:00
2023-09-18 17:20:52 +00:00
2020-05-09 00:33:27 +00:00
2023-08-25 15:06:47 +00:00
2020-05-09 00:33:27 +00:00
2020-05-09 00:33:27 +00:00
2021-10-28 18:17:57 +00:00
2022-03-29 16:24:51 +00:00
2023-09-18 17:20:52 +00:00
2023-08-30 19:09:46 +00:00
2023-11-17 23:16:28 +00:00
2023-11-17 23:16:28 +00:00
2023-11-17 23:16:28 +00:00
2022-05-03 14:38:32 +00:00
2023-11-17 23:16:28 +00:00
2023-11-17 23:16:28 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2024-01-10 03:29:50 +00:00
2019-09-17 16:25:15 +00:00
2019-09-17 16:25:15 +00:00
2021-03-14 17:56:50 +00:00
2022-03-29 16:24:51 +00:00
2019-09-17 16:25:15 +00:00
2023-09-18 17:20:52 +00:00
2021-10-28 18:17:57 +00:00
2019-09-17 16:25:15 +00:00
2023-12-11 23:01:52 +00:00
2019-10-16 17:46:16 +00:00
2021-11-02 18:35:35 +00:00
2023-09-18 17:20:52 +00:00
2023-09-18 17:20:52 +00:00
2023-07-20 16:58:25 +00:00
2023-09-18 17:20:52 +00:00
2021-10-28 18:17:57 +00:00
2021-10-28 18:17:57 +00:00
2023-09-18 17:20:52 +00:00
2023-05-18 09:15:25 +00:00
2023-09-18 17:20:52 +00:00
2021-12-13 16:42:31 +00:00
2024-01-10 03:29:50 +00:00
2021-10-28 18:17:57 +00:00
2023-09-18 17:20:52 +00:00
2022-10-07 16:48:35 +00:00