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

Issue 4754045: code review 4754045: http: Make StripPrefix use a path of "/" when the input... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 7 months ago by andybalholm
Modified:
14 years, 7 months ago
Reviewers:
rsc
CC:
golang-dev
Visibility:
Public.

Description

http: Make StripPrefix leave a "/" at the start of the stripped path, even if the prefix ends with a "/". It was using the empty string when the path was equal to the prefix, which caused a panic in ServeFile.

Patch Set 1 #

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

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

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -0 lines) Patch
M src/pkg/http/server.go View 1 2 1 chunk +4 lines, -0 lines 1 comment Download

Messages

Total messages: 11
andybalholm
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 7 months ago (2011-07-16 04:43:22 UTC) #1
rsc
I am not convinced. If you want it not to strip the final slash in ...
14 years, 7 months ago (2011-07-18 13:59:57 UTC) #2
andybalholm
On Jul 18, 2011, at 6:59 AM, Russ Cox wrote: > I am not convinced. ...
14 years, 7 months ago (2011-07-18 14:22:58 UTC) #3
rsc
> That makes sense for new code. > > But I took a working program ...
14 years, 7 months ago (2011-07-18 14:24:29 UTC) #4
andybalholm
On Jul 18, 2011, at 7:24 AM, Russ Cox wrote: > Aha. Yes, gofix is ...
14 years, 7 months ago (2011-07-18 14:40:23 UTC) #5
rsc
>> Aha. Yes, gofix is wrong. > > What should we do to gofix when ...
14 years, 7 months ago (2011-07-18 14:49:01 UTC) #6
andybalholm
On Jul 18, 2011, at 7:48 AM, Russ Cox wrote: > I am pretty sure ...
14 years, 7 months ago (2011-07-18 15:22:18 UTC) #7
andybalholm
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 7 months ago (2011-07-18 15:31:35 UTC) #8
rsc
http://codereview.appspot.com/4754045/diff/7002/src/pkg/http/server.go File src/pkg/http/server.go (right): http://codereview.appspot.com/4754045/diff/7002/src/pkg/http/server.go#newcode654 src/pkg/http/server.go:654: if prefix != "" && prefix[len(prefix)-1] == '/' { ...
14 years, 7 months ago (2011-07-18 15:35:14 UTC) #9
andybalholm
On Jul 18, 2011, at 8:35 AM, rsc@golang.org wrote: > This is a string manipulation ...
14 years, 7 months ago (2011-07-18 17:23:31 UTC) #10
andybalholm
14 years, 7 months ago (2011-07-18 17:30:14 UTC) #11
*** Abandoned ***
Sign in to reply to this message.

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