mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
http.requestHasBody: a PUT response can have a body
HEAD/TRACE are bodyless, but PUT responses are body-capable per RFC 7231.
This commit is contained in:
parent
a1827d5977
commit
854774d468
1 changed files with 2 additions and 2 deletions
|
|
@ -44,8 +44,8 @@ pub const Method = enum {
|
|||
/// Actual behavior from clients may vary and should still be checked
|
||||
pub fn responseHasBody(m: Method) bool {
|
||||
return switch (m) {
|
||||
.GET, .POST, .DELETE, .CONNECT, .OPTIONS, .PATCH => true,
|
||||
.HEAD, .PUT, .TRACE => false,
|
||||
.GET, .POST, .PUT, .DELETE, .CONNECT, .OPTIONS, .PATCH => true,
|
||||
.HEAD, .TRACE => false,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue