Permalink
Browse files

checksum bug fix

  • Loading branch information...
1 parent c9aa80d commit 15db1c0cece19e1c331d210fd00d4d9cf30c3580 @jaredwilkening jaredwilkening committed Jul 11, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 shock-server/request/request.go
@@ -130,12 +130,12 @@ func ParseMultipartForm(r *http.Request) (params map[string]string, files node.F
*/
files[part.FormName()] = node.FormFile{Name: part.FileName(), Path: tmpPath, Checksum: make(map[string]string)}
if tmpFile, err := os.Create(tmpPath); err == nil {
- buffer := make([]byte, 32*1024)
md5c := make(chan checkSumCom)
sha1c := make(chan checkSumCom)
writeChecksum(md5.New, md5c)
writeChecksum(sha1.New, sha1c)
for {
+ buffer := make([]byte, 32*1024)
n, err := part.Read(buffer)
if n == 0 || err != nil {
md5c <- checkSumCom{n: 0}

0 comments on commit 15db1c0

Please sign in to comment.