{"push_id":571247943,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"1e3bfff46d06edd99ad4a163f70509d10dde4d13","before":"29a13a63f0f28e65a2f403593977c09156b331e2","commits":[{"sha":"1e3bfff46d06edd99ad4a163f70509d10dde4d13","author":{"email":"fca2860efd8dad50cf8eb22c4c2a2790fedfff47@gmail.com","name":"Hariprasad Kulkarni"},"message":"Fixes #34 logged on knox-mpu\n\nThe \"path\" in a HTTP request uses space as a delimiter. If a file name contains a space, the HTTP request will be,\r\nGET /New Text Document.txt HTTP/1.1\r\nThis will result in AWS returning an \"Unsupported HTTP version\" error, because HTTP does not understand the extra \"Text Document.txt\" in the HTTP request.\r\nThe fix is to replace the spaces in the \"path\" with the url encoded string \"%20\". The new request will now be,\r\nGET /New%20Text%20Document.txt HTTP/1.1\r\nNote: We cannot use the native JS encodeURI(). This is because the file name can have a '/' to indicate the folder structure of your S3 bucket.\r\nFor Ex. If you are uploading a picture, to a folder called \"pictures\" in your S3 bucket, you will have to specify the file name as \"/pictures/New Pic.jpg\".\r\nThe encoded version of this will be \"%2Fpictures%2FNew%20Pic.jpg\".\r\nIf you take a look at \"Client.prototype.request\" in client.js in the Knox library, you will see that if a file name does not start with a '/', Knox adds one.\r\nThis will result in a file named \"%2Fpictures%2FNew%20Pic.jpg\" being uploaded to the root directory of your S3 bucket.","distinct":true,"url":"https://api.github.com/repos/hariprasadkulkarni/knox-mpu/commits/1e3bfff46d06edd99ad4a163f70509d10dde4d13"}]}