* CA-249845: Compiling the server status reports sometime fails with System.IO.IOException: The process cannot access the file because it is being used by another process
Add a retry mechanism around the File.Move, because the operation sometimes fails when there is an anti-virus running on the XenCenter machine (we are doing the move immediately after we finished writing the file and the anti-virus software might be checking the file at that point)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CA-249845: Compiling the server status reports sometime fails with System.IO.IOException: The process cannot access the file because it is being used by another process
Extract the move with retry into a separate function
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Improved the ReadHttpHeaders function, by making sure that a chunk is read fully from the stream (the number of bytes read by the Stream.Read function can be less than the number of bytes requested, so we need to continue reading until the required number of bytes is read)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2 new radio buttons in Connection Options page, for Basic and Digest; Digest is the default as it's the most secure.
New proxy authentication method setting, which is used to configure XenAPI's HTTP class and the .NET AuthenticationManager (which handles which authentication schemes can be used by the .NET web classes).
The new setting is also transferred and used by the Health Check service.
The bug noted in CA-214653 also occurs here, but the work-around on PR#1201 for that bug will also work for this.
Signed-off-by: Frezzle <frederico.mazzone@citrix.com>
Added comment on why we don't use StreamReader, for future reference.
Changed lambda syntax to more compact version, for readability.
Signed-off-by: Frezzle <frederico.mazzone@citrix.com>
Moved MD5Hash function from EncryptionUtils to HTTP class.
Replaced unnecessary new string/List-related functions with existing methods.
Removed redundant string.IsNullOrEmpty() call.
Changed duplicate hotkey in Connection Options page.
Signed-off-by: Frezzle <frederico.mazzone@citrix.com>
Now transfers proxy credentials in encrypted format and checks for default empty credentials when loading them for first time.
Fixed a break in unit test in HTTP.ReadHttpHeaders().
Signed-off-by: Frederico Mazzone <fredericom@citrite.net>
Added 2 textboxes for proxy username and password; encrypted when saved and decrypted when loaded.
Added 2 checkboxes; one for bypassing proxy for xenserver connections, one for providing proxy credentials.
Removed checkbox for bypassing proxy for local addresses.
Controls are no longer enabled/disabled when the related proxy option is selected/deselected.
Making changes to a control (e.g. username, bypass checkbox, etc) selects the 'Use this proxy server' option automatically.
Removed "Bypass proxy server for local addresses" option.
Basic and Digest authentication implemented. Tested with FreeProxy (Basic+Digest), CCProxy (Basic) and AnalogX Proxy (no authentication); each were tested with correct credentials, incorrect credentials and missing credentials; all gave expected results.
Signed-off-by: Frederico Mazzone <fredericom@citrite.net>
-Added 'Host:' to HTTP headers for all the HTTP GET and PUT requests sent by XenCenter.
This change will presumably fix network issues occurring when going through certain corporate firewalls/proxies.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>