1
0
mirror of https://github.com/golang/go synced 2024-10-04 15:11:20 -06:00
Commit Graph

21 Commits

Author SHA1 Message Date
Francisco Claude
8560ead38a multipart: fixes problem parsing mime/multipart of certain lengths
When parsing the multipart data, if the delimiter appears but doesn't
finish with -- or \n or \r\n, it assumes the data can be consumed. This
is incorrect when the peeking buffer finishes with --delimiter-

Fixes #12662

Change-Id: I329556a9a206407c0958289bf7a9009229120bb9
Reviewed-on: https://go-review.googlesource.com/14652
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-09-24 09:00:52 +00:00
Brad Fitzpatrick
3ed6e830b9 mime: fix docs for WordDecoder.Decode
It was correct for an early version of the CL which introduced the
type, but later versions of the CL changed the behavior without
updating the documentation.

Fixes #12568

Change-Id: Ia4090a02ba122e9f8317ed86c4c9839ae2c539e0
Reviewed-on: https://go-review.googlesource.com/14496
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-09-10 21:50:17 +00:00
Andrew Gerrand
8ca785621e mime: move examples to external test file
Fixes #11257

Change-Id: I3f75db47b0f8e877d81e3c2dcea01ff747b47685
Reviewed-on: https://go-review.googlesource.com/13779
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-08-22 18:39:29 +00:00
Matthew Dempsky
a01d90744f all: cleanup usage of dashes in package documentation
Change-Id: I58453f7ed71eaca15dd3f501e4ae88d1fab19908
Reviewed-on: https://go-review.googlesource.com/12683
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Rob Pike <r@golang.org>
2015-07-28 02:44:41 +00:00
Brad Fitzpatrick
2ae77376f7 all: link to https instead of http
The one in misc/makerelease/makerelease.go is particularly bad and
probably warrants rotating our keys.

I didn't update old weekly notes, and reverted some changes involving
test code for now, since we're late in the Go 1.5 freeze. Otherwise,
the rest are all auto-generated changes, and all manually reviewed.

Change-Id: Ia2753576ab5d64826a167d259f48a2f50508792d
Reviewed-on: https://go-review.googlesource.com/12048
Reviewed-by: Rob Pike <r@golang.org>
2015-07-11 14:36:33 +00:00
Brad Fitzpatrick
85938714e9 mime/multipart: fix bug when body contains prefix of the boundary
Fixes #10616

Change-Id: I4ef25eb0be6ccf474976fdb5087dd2c62c66c510
Reviewed-on: https://go-review.googlesource.com/11811
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-02 16:04:34 +00:00
Michael Gehring
4105265c66 mime: add mime.types paths for BSDs
Change-Id: I22ac23e7e180071de4443291e0a644675200d642
Reviewed-on: https://go-review.googlesource.com/10950
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2015-06-12 15:51:21 +00:00
Alexandre Cesaro
f04e7bb1cf mime: fix names of examples
The names of examples were wrong so they were not shown in
the documentation.

Change-Id: Ib1b985b44d2e056c38c008a591cb441e422c4717
Reviewed-on: https://go-review.googlesource.com/10404
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-06-01 22:20:58 +00:00
Alexandre Cesaro
2b03610842 mime: Export RFC 2047 code
Fixes #4943
Fixes #4687
Fixes #7079

Change-Id: Ia96f07d650a3af935cd75fd7e3253f4af2977429
Reviewed-on: https://go-review.googlesource.com/7890
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2015-05-11 18:50:32 +00:00
Alex Brainman
89454b1c39 mime, time, internal/syscall/windows/registry: use new registry package to simplify code
This CL copies golang.org/x/sys/windows/registry into
internal/syscall/windows/registry (minus KeyInfo.ModTime to prevent
dependency cycles). New registry package is used in mime and time
packages instead of calling Windows API directly.

Change-Id: I965a5a41d4739b3ba38e539a7b8d96d3223e3d56
Reviewed-on: https://go-review.googlesource.com/9271
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-04-30 04:33:42 +00:00
Alexandre Cesaro
6b045d9aef mime/quotedprintable: Return a Reader instead of an io.Reader
It is not needed right now, but it will allow more flexibility in
the future.

Fixes #10472

Change-Id: I2eaea70abeca5ed10f89b0b2dfdabdac376a0a41
Reviewed-on: https://go-review.googlesource.com/8964
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-04-16 16:18:26 +00:00
Alexandre Cesaro
fa3ad1ebb5 mime/quotedprintable: add binary mode to the writer
Change-Id: Id82c3111d7571263208ced3d011ad80f3fe55984
Reviewed-on: https://go-review.googlesource.com/7892
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2015-03-30 12:49:19 +00:00
Brad Fitzpatrick
b86f393167 mime: tighten up and simplify tests
Don't test so much at once.

Fixes #10278

Change-Id: I32a9cb81a3cffecc7ce4f83c35a4b589bcd3a9f7
Reviewed-on: https://go-review.googlesource.com/8213
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-03-30 09:12:03 +00:00
Nick Cooper
ec56bad1fc mime: add ExtensionByType method
Added the inverse of TypeByExtension for discovering an appropriate
extensions for a given MIME type.

Fixes #10144

Change-Id: I6a80e1af3db5d45ad6a4c7ff4ccfdf6a4f424367
Reviewed-on: https://go-review.googlesource.com/7444
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-03-27 16:24:07 +00:00
Alexandre Cesaro
cf68fac7e7 mime/quotedprintable: accept badly encoded bytes
RFC 2045 says:
    An "=" followed by two hexadecimal digits, one or both
    of which are lowercase letters in "abcdef", is formally
    illegal. A robust implementation might choose to
    recognize them as the corresponding uppercase letters.

    https://tools.ietf.org/html/rfc2045#page-22

Change-Id: Ibb4b1e4b8bf4fa65ff895ba486a931d90308bf70
Reviewed-on: https://go-review.googlesource.com/7891
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-03-24 22:35:58 +00:00
Joe Harrison
21e47d831b mime: add "image/svg+xml" type for extension ".svg"
Since there is internal usage of svg files in cmd/trace served via
HTTP, add it to the (small) map of mime types.

MIME type as documented at http://www.w3.org/TR/SVG11/mimereg.html

Change-Id: If14f07cbe2e55d8d68af663f30920a530e2e7974
Reviewed-on: https://go-review.googlesource.com/7942
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2015-03-23 16:53:00 +00:00
Alexandre Cesaro
43dfb879a3 mime/quotedprintable: add writer
Updates #4943

Change-Id: I082b97ccd787cf91245d39b8d93783732db6f42c
Reviewed-on: https://go-review.googlesource.com/6171
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-03-20 06:12:41 +00:00
Josh Bleecher Snyder
2adc4e8927 all: use "reports whether" in place of "returns true if(f)"
Comment changes only.

Change-Id: I56848814564c4aa0988b451df18bebdfc88d6d94
Reviewed-on: https://go-review.googlesource.com/7721
Reviewed-by: Rob Pike <r@golang.org>
2015-03-18 15:14:06 +00:00
Alexandre Cesaro
045f9df466 mime/quotedprintable: create the package
This commit creates the mime/quotedprintable package. It moves and
exports the QP reader of mime/internal/quotedprintable.

The code is almost unchanged to preserve the commit history.

Updates #4943

Change-Id: I4b7b5a2a40a4c84346d42e4cdd2c11a91b28f9e3
Reviewed-on: https://go-review.googlesource.com/5940
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-02-26 20:09:28 +00:00
Alexandre Cesaro
0d4ea0c70d mime/multipart: moved some code to mime/internal/quotedprintable
The code concerning quoted-printable encoding (RFC 2045) and its
variant for MIME headers (RFC 2047) is currently spread in
mime/multipart and net/mail. It is also not exported.

This commit is the first step to fix that issue. It moves the
quoted-printable decoding code from mime/multipart to
mime/internal/quotedprintable. The exposed API is unchanged.

Concerns #4943.

Change-Id: I11352afbb2edb4d6ef62870b9bc5c87c639eff12
Reviewed-on: https://go-review.googlesource.com/1810
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-23 19:30:02 +00:00
Russ Cox
c007ce824d build: move package sources from src/pkg to src
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
2014-09-08 00:08:51 -04:00