Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

checksum bug fix

  • Loading branch information...
commit 15db1c0cece19e1c331d210fd00d4d9cf30c3580 1 parent c9aa80d
@jaredwilkening jaredwilkening authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  shock-server/request/request.go
View
2  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}
Please sign in to comment.
Something went wrong with that request. Please try again.