Ver Fonte

Documented a known bug

Rod Hynes há 10 anos atrás
pai
commit
0300ac58f0
1 ficheiros alterados com 10 adições e 0 exclusões
  1. 10 0
      psiphon/upgradeDownload.go

+ 10 - 0
psiphon/upgradeDownload.go

@@ -33,6 +33,16 @@ import (
 // config.UpgradeDownloadFilename.
 // config.UpgradeDownloadFilename.
 // NOTE: this code does not check that any existing file at config.UpgradeDownloadFilename
 // NOTE: this code does not check that any existing file at config.UpgradeDownloadFilename
 // is actually the version specified in clientUpgradeVersion.
 // is actually the version specified in clientUpgradeVersion.
+//
+// BUG: a download that resumes after automation replaces the server-side upgrade entity
+// will end up with corrupt data (some part of the older entity, followed by part of
+// the newer entity). This is not fatal since authentication of the upgrade package will
+// will detect this and the upgrade will be re-downloaded in its entirety. A fix would
+// involve storing the entity ETag with the partial download and using If-Range
+// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.27), or, since S3 doesn't
+// list the If-Range header as supported
+// (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), If-Match followed
+// be a re-request on failure.
 func DownloadUpgrade(config *Config, clientUpgradeVersion string, tunnel *Tunnel) error {
 func DownloadUpgrade(config *Config, clientUpgradeVersion string, tunnel *Tunnel) error {
 
 
 	// Check if complete file already downloaded
 	// Check if complete file already downloaded