You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've written a Webdav server using the community edition of milton2. That works great - but when we download a file, sometimes unexpected zero bytes are added.
Maybe this is caused by our encryption. We don't store the original file on the server. Instead, we encrypt it when we upload the file, and we decrypt it during the download.
Of course, encrypting the file makes it larger.
After downloading the file, we observe that the file is decrypted correctly. However, it's too large. It has the size of the encrypted file. It's filled up with zero-bytes.
It seems milton2 always makes sure that the file size is the number returned by GetableResource#getContentLength(). In our case, the number return getContentLength() is larger than the real file size. It seems milton2 sets the file size to getContentLength(). In our case, this amounts to adding the content of the empty buffer.
The text was updated successfully, but these errors were encountered:
We've written a Webdav server using the community edition of milton2. That works great - but when we download a file, sometimes unexpected zero bytes are added.
Maybe this is caused by our encryption. We don't store the original file on the server. Instead, we encrypt it when we upload the file, and we decrypt it during the download.
Of course, encrypting the file makes it larger.
After downloading the file, we observe that the file is decrypted correctly. However, it's too large. It has the size of the encrypted file. It's filled up with zero-bytes.
It seems milton2 always makes sure that the file size is the number returned by GetableResource#getContentLength(). In our case, the number return getContentLength() is larger than the real file size. It seems milton2 sets the file size to getContentLength(). In our case, this amounts to adding the content of the empty buffer.
The text was updated successfully, but these errors were encountered: