| author | |
| committer | |
| log | 854774d468b0a439def7eef73c544ac8d64f1b62 |
| tree | 5d137c4848c0b8b508c008d12a44516b10e9394f |
| parent | a1827d597723aff6236001bd0bb74a6b0bab9ce7 |
HEAD/TRACE are bodyless, but PUT responses are body-capable
per RFC 7231.1 files changed, 2 insertions(+), 2 deletions(-)
lib/std/http.zig+2-2| ... | ... | @@ -44,8 +44,8 @@ pub const Method = enum { |
| 44 | 44 | /// Actual behavior from clients may vary and should still be checked |
| 45 | 45 | pub fn responseHasBody(m: Method) bool { |
| 46 | 46 | return switch (m) { |
| 47 | .GET, .POST, .DELETE, .CONNECT, .OPTIONS, .PATCH => true, | |
| 48 | .HEAD, .PUT, .TRACE => false, | |
| 47 | .GET, .POST, .PUT, .DELETE, .CONNECT, .OPTIONS, .PATCH => true, | |
| 48 | .HEAD, .TRACE => false, | |
| 49 | 49 | }; |
| 50 | 50 | } |
| 51 | 51 |