mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-11-23 14:24:03 +00:00
Fix #5 - support leading tab on multi-line header
This commit is contained in:
parent
1bc68344f9
commit
90dc75e392
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ func ContentFromString(data string) *Content {
|
|||
hdrs := strings.Split(headers, "\r\n")
|
||||
var lastHdr = ""
|
||||
for _, hdr := range hdrs {
|
||||
if lastHdr != "" && strings.HasPrefix(hdr, " ") {
|
||||
if lastHdr != "" && (strings.HasPrefix(hdr, " ") || strings.HasPrefix(hdr, "\t")) {
|
||||
h[lastHdr][len(h[lastHdr])-1] = h[lastHdr][len(h[lastHdr])-1] + hdr
|
||||
} else if strings.Contains(hdr, ": ") {
|
||||
y := strings.SplitN(hdr, ": ", 2)
|
||||
|
|
Loading…
Reference in a new issue