Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Issue 5272049: code review 5272049: textproto: prevent long lines in HTTP headers from caus... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by msolo
Modified:
10 years, 6 months ago
Reviewers:
CC:
golang-dev
Visibility:
Public.

Description

textproto: prevent long lines in HTTP headers from causing HTTP 400 responses. This fixes the issue without an extra copy in the average case.

Patch Set 1 #

Patch Set 2 : diff -r dd81822c18a9 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r dd81822c18a9 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r dd81822c18a9 https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 5 : diff -r 3213129c689b https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -2 lines) Patch
M src/pkg/net/textproto/reader.go View 1 2 3 4 1 chunk +16 lines, -2 lines 0 comments Download
M src/pkg/net/textproto/reader_test.go View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 20
msolo
Hello golang-dev@googlegroups.com (cc: bradfitz@golang.org, golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 8 months ago (2011-10-15 06:12:31 UTC) #1
ality
You can avoid the nesting by doing this instead: func (r *Reader) readLineSlice() ([]byte, os.Error) ...
10 years, 8 months ago (2011-10-15 07:58:12 UTC) #2
msolo
Hello golang-dev@googlegroups.com, ality@pbrane.org (cc: bradfitz@golang.org, golang-dev@googlegroups.com), Please take another look.
10 years, 8 months ago (2011-10-18 06:51:12 UTC) #3
bradfitz
http://codereview.appspot.com/5272049/diff/6001/src/pkg/net/textproto/reader_test.go File src/pkg/net/textproto/reader_test.go (right): http://codereview.appspot.com/5272049/diff/6001/src/pkg/net/textproto/reader_test.go#newcode154 src/pkg/net/textproto/reader_test.go:154: t.Fatalf("ReadMIMEHeader: %v, %v; want %v", m, err, want) this ...
10 years, 8 months ago (2011-10-18 13:33:09 UTC) #4
bradfitz
10 years, 8 months ago (2011-10-18 13:35:32 UTC) #5
msolo
Hello golang-dev@googlegroups.com, ality@pbrane.org, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 8 months ago (2011-10-18 18:51:55 UTC) #6
bradfitz
http://codereview.appspot.com/5272049/diff/13001/src/pkg/net/textproto/reader_test.go File src/pkg/net/textproto/reader_test.go (right): http://codereview.appspot.com/5272049/diff/13001/src/pkg/net/textproto/reader_test.go#newcode151 src/pkg/net/textproto/reader_test.go:151: t.Fatalf("ReadMIMEHeader: failed with err %v", err) you could remove ...
10 years, 8 months ago (2011-10-18 19:01:33 UTC) #7
bradfitz
http://codereview.appspot.com/5272049/diff/13001/src/pkg/net/textproto/reader.go File src/pkg/net/textproto/reader.go (right): http://codereview.appspot.com/5272049/diff/13001/src/pkg/net/textproto/reader.go#newcode57 src/pkg/net/textproto/reader.go:57: return line, err bufio.Reader.ReadLine is documented to say: "ReadLine ...
10 years, 8 months ago (2011-10-18 19:29:04 UTC) #8
msolo
Hello golang-dev@googlegroups.com, ality@pbrane.org, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 8 months ago (2011-10-18 20:32:57 UTC) #9
ality
bradfitz@golang.org once said: > src/pkg/net/textproto/reader.go:57: return line, err > bufio.Reader.ReadLine is documented to say: > ...
10 years, 8 months ago (2011-10-18 21:13:20 UTC) #10
msolo
On Tue, Oct 18, 2011 at 2:13 PM, Anthony Martin <ality@pbrane.org> wrote: > bradfitz@golang.org once ...
10 years, 8 months ago (2011-10-18 22:54:39 UTC) #11
msolo
Any further comment or is this good to go? On Tue, Oct 18, 2011 at ...
10 years, 8 months ago (2011-10-19 21:49:21 UTC) #12
bradfitz
I was going to look into the claimed bufio doc bug first before I was ...
10 years, 8 months ago (2011-10-19 22:29:25 UTC) #13
msolo
Got a little side tracked so just picking this back up now. This test demonstrates ...
10 years, 8 months ago (2011-11-01 07:05:55 UTC) #14
bradfitz
LGTM (on original patch) and thanks for the bufio test. Sent out a little fix ...
10 years, 8 months ago (2011-11-01 17:29:26 UTC) #15
bradfitz
*** Submitted as http://code.google.com/p/go/source/detail?r=e953a63b7014 *** textproto: prevent long lines in HTTP headers from causing HTTP ...
10 years, 8 months ago (2011-11-01 17:31:42 UTC) #16
ality
Hey Mike, can you please hg sync so this can be closed on the codereview ...
10 years, 6 months ago (2011-12-11 11:09:10 UTC) #17
rsc
On Sun, Dec 11, 2011 at 06:09, <ality@pbrane.org> wrote: > Hey Mike, can you please ...
10 years, 6 months ago (2011-12-12 21:15:56 UTC) #18
rsc
10 years, 6 months ago (2011-12-12 21:16:16 UTC) #19
msolo
10 years, 6 months ago (2011-12-12 23:46:21 UTC) #20
I ran the sync this morning, hopefully that cleaned it up.

On Mon, Dec 12, 2011 at 1:16 PM,  <rsc@golang.org> wrote:
> https://codereview.appspot.com/5272049/
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b