PowerShell/test/powershell/Modules
Mark Kraus d20d53eaac Add -Resume Feature to Web Cmdlets (#6447)
Fixes #5964

Adds -Resume switch to Invoke-WebRequest and Invoke-RestMethod

-Resume requires -OutFile

Enables the ability to resume downloading a partially or incompletely downloaded file.

File Size is the only indicator of local and remote file parity.

If the local file is smaller than the remote file and the remote endpoint supports resume, the local file will be appended with the remaining bytes.

If the local file is larger than the remote file, the local file will be overwritten

If the remote server does not support resume, the local file will be overwritten

If the local file is the same size as the remote file, the remote endpoint will return a 416 status code. This response is special-cased as a success in this instance. The local file remains untouched and it is assumed the file was already successfully downloaded previously.

If the local file does not exist it will be created and the entire remote file will be requested.

Added tests for all code new code paths (I'm pretty sure anyway)

Added /Resume Controller to WebListener

Documented /Resume Controller

Updated .spelling to reflect terms in WebListener docs

Note: I had to change the way GetResponse() tracks the current URI as we now have 3 places where the call is taking place. I don't foresee this causing any regressions. This area needs some refactoring. especially if we want to implement a retry mechanism
2018-03-26 12:23:24 -07:00
..
CimCmdlets Use new Pester syntax: -Parameter for Pester tests in Modules/CimCmdlets (#6306) 2018-03-07 10:54:41 -08:00
Microsoft.PowerShell.Core Update tests in Modules/Microsoft.PowerShell.Core to use new Pester syntax. (#6349) 2018-03-23 10:36:11 -07:00
Microsoft.PowerShell.Diagnostics Update tests in Modules/Microsoft.PowerShell.Diagnostics to use new Pester syntax. (#6351) 2018-03-23 10:33:43 -07:00
Microsoft.Powershell.Host Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00
Microsoft.PowerShell.LocalAccounts Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00
Microsoft.PowerShell.Management Fix error in windows provider when the environment as an existing set of variables name that only differs by case (#6320) 2018-03-21 12:30:49 -07:00
Microsoft.PowerShell.Security Update tests in Microsoft.PowerShell.Security folder to use Pesterv4 syntax (#6256) 2018-03-23 10:41:14 -07:00
Microsoft.PowerShell.Utility Add -Resume Feature to Web Cmdlets (#6447) 2018-03-26 12:23:24 -07:00
Microsoft.WSMan.Management Use new Pester syntax: -Parameter for Pester tests in modules: Microsoft.PowerShell.Utility and Microsoft.WSMan.Management. (#6366) 2018-03-23 10:26:23 -07:00
PackageManagement Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00
PowerShellGet Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00
PSDesiredStateConfiguration Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00
PSReadLine Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00