Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #84 from jaredwilkening/master

fixed bug in checksums
  • Loading branch information...
commit 23ba00dc3f5ee02c16ea1fc63a8b3ed813c6219b 2 parents e20191c + 15db1c0
@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.