mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUACAMOLE-462: Report size of files downloaded via the static HTTP tunnel.
This commit is contained in:
		| @@ -1365,6 +1365,14 @@ Guacamole.StaticHTTPTunnel = function StaticHTTPTunnel(url, crossDomain, extraTu | ||||
|      */ | ||||
|     var extraHeaders = extraTunnelHeaders || {}; | ||||
|  | ||||
|     /** | ||||
|      * The number of bytes in the file being downloaded, or null if this is not | ||||
|      * known. | ||||
|      * | ||||
|      * @type {number} | ||||
|      */ | ||||
|     this.size = null; | ||||
|  | ||||
|     this.sendMessage = function sendMessage(elements) { | ||||
|         // Do nothing | ||||
|     }; | ||||
| @@ -1411,6 +1419,9 @@ Guacamole.StaticHTTPTunnel = function StaticHTTPTunnel(url, crossDomain, extraTu | ||||
|  | ||||
|             } | ||||
|  | ||||
|             // Report overall size of stream in bytes, if known | ||||
|             tunnel.size = response.headers.get('Content-Length'); | ||||
|  | ||||
|             // Connection is open | ||||
|             tunnel.setState(Guacamole.Tunnel.State.OPEN); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user