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

Issue 4654089: code review 4654089: http: fix Content-Type of file extension. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 10 months ago by mattn
Modified:
13 years, 10 months ago
Reviewers:
CC:
bradfitz, rsc, golang-dev
Visibility:
Public.

Description

http: fix Content-Type of file extension. ServeFile() pass empty string to serveFile(). serveFile() should get file extension via joining root and filename.

Patch Set 1 #

Patch Set 2 : diff -r bb79fe092dda http://go.googlecode.com/hg/ #

Patch Set 3 : diff -r bb79fe092dda http://go.googlecode.com/hg/ #

Patch Set 4 : diff -r bb79fe092dda http://go.googlecode.com/hg/ #

Patch Set 5 : diff -r bb79fe092dda http://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 80756338ccf7 http://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 7 : diff -r 80756338ccf7 http://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -1 line) Patch
M src/pkg/http/fs.go View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M src/pkg/http/fs_test.go View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download
A src/pkg/http/testdata/style.css View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 8
mattn
Hello golang-dev@googlecode.com, bradfitz@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to http://go.googlecode.com/hg/
13 years, 10 months ago (2011-07-05 12:46:30 UTC) #1
rsc
The right fix probably in ServeFile: dir, file := filepath.Split(name) serveFile(w, r, Dir(dir), file, false)
13 years, 10 months ago (2011-07-12 00:06:06 UTC) #2
bradfitz
what is testdata/style.css for? Is there a missing test file in this CL? On Tue, ...
13 years, 10 months ago (2011-07-12 00:08:33 UTC) #3
mattn
@rsc done @bradfiz Please see: http://codereview.appspot.com/4654089/patch/7005/10002 I guess that this is better to be this ...
13 years, 10 months ago (2011-07-12 00:23:45 UTC) #4
bradfitz
http://codereview.appspot.com/4654089/diff/7005/src/pkg/http/fs_test.go File src/pkg/http/fs_test.go (right): http://codereview.appspot.com/4654089/diff/7005/src/pkg/http/fs_test.go#newcode189 src/pkg/http/fs_test.go:189: t.Errorf("Content-Type mismatch: got %d, want %d", h, want) %q, ...
13 years, 10 months ago (2011-07-12 00:26:20 UTC) #5
mattn
http://codereview.appspot.com/4654089/diff/7005/src/pkg/http/fs_test.go File src/pkg/http/fs_test.go (right): http://codereview.appspot.com/4654089/diff/7005/src/pkg/http/fs_test.go#newcode189 src/pkg/http/fs_test.go:189: t.Errorf("Content-Type mismatch: got %d, want %d", h, want) On ...
13 years, 10 months ago (2011-07-12 00:28:27 UTC) #6
rsc
LGTM
13 years, 10 months ago (2011-07-13 21:39:25 UTC) #7
rsc
13 years, 10 months ago (2011-07-13 21:39:37 UTC) #8
*** Submitted as http://code.google.com/p/go/source/detail?r=e904b6784768 ***

http: fix Content-Type of file extension.
ServeFile() pass empty string to serveFile(). serveFile() should get
file extension via joining root and filename.

R=bradfitz, rsc
CC=golang-dev
http://codereview.appspot.com/4654089

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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