update for Go change

Change-Id: Ibe1507e8cf3f9d1f8196201739e9c74a9b9d8e0a
This commit is contained in:
Brad Fitzpatrick 2011-06-22 15:38:03 -07:00
parent 9ce137e66d
commit 81cc07f564
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ func serveFile(w http.ResponseWriter, r *http.Request, name string, fs FileSyste
// TODO(adg): handle multiple ranges // TODO(adg): handle multiple ranges
ranges, err := parseRange(r.Header.Get("Range"), size) ranges, err := parseRange(r.Header.Get("Range"), size)
if err == nil && len(ranges) > 1 { if err == nil && len(ranges) > 1 {
err = os.ErrorString("multiple ranges not supported") err = os.NewError("multiple ranges not supported")
} }
if err != nil { if err != nil {
http.Error(w, err.String(), http.StatusRequestedRangeNotSatisfiable) http.Error(w, err.String(), http.StatusRequestedRangeNotSatisfiable)