• Russ Cox's avatar
    mime: preserve unnecessary backslash escapes as literals · eac59508
    Russ Cox authored
    When MSIE sends a full file path (in "intranet mode"), it does not
    escape backslashes: "C:\dev\go\foo.txt", not "C:\\dev\\go\\foo.txt".
    
    No known MIME generators emit unnecessary backslash escapes
    for simple token characters like numbers and letters.
    
    If we see an unnecessary backslash escape, assume it is from MSIE
    and intended as a literal backslash. This makes Go servers deal better
    with MSIE without affecting the way they handle conforming MIME
    generators.
    
    Fixes #15664.
    
    Change-Id: Ia3b03b978317d968dc11b2f6de1df913c6bcbfcc
    Reviewed-on: https://go-review.googlesource.com/32175Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    eac59508
mediatype.go 8.63 KB