Fix issue where you'd get hanging connections, passing a \r into fileIds.

Working with bash it's easier to get a \r in your ids, than not.
Even more so, it's hard to debug when it happens and hangs your HEAD
request.

To reproduce:
git pull
git checkout 6ac7656bec
go run src/cmd/tusd/*.go
./scripts/demo-alphabet.sh
This commit is contained in:
Kevin van Zonneveld 2013-03-20 16:28:40 +01:00
parent 6ac7656bec
commit 06c230a0c2
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import (
"strconv" "strconv"
) )
var fileRoute = regexp.MustCompile("^/files/([^/]+)$") var fileRoute = regexp.MustCompile("^/files/([^/\r\n]+)\r?$")
var filesRoute = regexp.MustCompile("^/files/?$") var filesRoute = regexp.MustCompile("^/files/?$")
var dataStore *DataStore var dataStore *DataStore