moved Read/Send code to http.Connection

This commit is contained in:
Altair-sh
2026-11-04 03:32:36 +01:00
parent 59f7d873be
commit 0ecbb629ea
10 changed files with 297 additions and 274 deletions
+13
View File
@@ -6,6 +6,19 @@ import (
"strings"
)
const HeaderTimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT"
// search in splitted parts of header value
func HeaderValueContains(sourceSplit []string, target string) bool {
for _, v := range sourceSplit {
v = strings.TrimSpace(v)
if strings.EqualFold(v, target) {
return true
}
}
return false
}
// ContentDisposition builds a Content-Disposition header value (RFC 6266).
// dispositionType is "inline" or "attachment".
// filename is an ASCII fallback for old clients,