def reply.for.pick
import emerging-ezhttp@0.22.0.0/src/http.bend as Httpimport Base
1094# HEAD carries no message body; any other method keeps the body (RFC 9110 §9.3.2)
1095def reply.for.pick(reply: Reply, head: Bool) -> Reply:
1096 match reply head:
1097 case Torn{why} _:
1098 Torn{why}
1099 case Reply{status, headers, body} False{}:
1100 Reply{status, headers, body}
1101 case Reply{status, headers, body} True{}:
1102 Reply{status, headers, ""}