]> Cypherpunks repositories - gostls13.git/commitdiff
mime: add a TODO, fix the format of an error
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 18 Apr 2011 18:21:16 +0000 (11:21 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 18 Apr 2011 18:21:16 +0000 (11:21 -0700)
R=r, rsc1
CC=golang-dev
https://golang.org/cl/4440054

src/pkg/mime/mediatype.go

index 9f8d2050e14bbd1c0aba6b609fc67638627f42ae..f28ff3e9681ea8a9f35a494894558b791b92cfc6 100644 (file)
@@ -136,7 +136,9 @@ func decode2231Enc(v string) string {
        if len(sv) != 3 {
                return ""
        }
-       // Ignoring lang in sv[1] for now.
+       // TODO: ignoring lang in sv[1] for now. If anybody needs it we'll
+       // need to decide how to expose it in the API. But I'm not sure
+       // anybody uses it in practice.
        charset := strings.ToLower(sv[0])
        if charset != "us-ascii" && charset != "utf-8" {
                // TODO: unsupported encoding
@@ -240,7 +242,7 @@ func percentHexUnescape(s string) (string, os.Error) {
                        if len(s) > 3 {
                                s = s[0:3]
                        }
-                       return "", fmt.Errorf("Bogus characters after %: %q", s)
+                       return "", fmt.Errorf("mime: bogus characters after %%: %q", s)
                }
                i += 3
        }