The HTTP RFC (https://tools.ietf.org/html/rfc7231#section-6.4) does not require a Location header to be present for redirects, thus it is required to check if the Location header is returned before using it.
The Test-Connection cmdlet works on Windows and Unix.
Implemented:
Ping
Continues Ping
Traceroute
Detect MTU size (seems don't work on Unix because of .Net Core issue)
Connect to TCP port
Not jet implemented:
I'm putting this off for the future.
Detect blackhole routers
PingPath
Additional considerations
As you can see in the tests .Net Core has issues in API implementation. As a result, some tests are skipped on Unix. There is also one issue on Windows. Related comments added to tests.
I'm going to open an issue(s) in CoreFX repo.
I think we should break the feedback into two parts:
scripting functionality
interactive functionality (display output)
Now I have implemented the output to the screen as the progress bar and as text (without ETS) - we have to decide what is best to use.
* Add checking if an output width is specified.
* change _failedToReadConsoleWidth variable to _noConsole bool value.
This variable is to cache the default console width when failed to get 'Console.WindowWidth' value.
* Terminate the loop in GetMainModule if main module is null.
* Run tests with FileVersionInfo also on non-windows platforms. Add test for process which main module can be null.
* In cases where the header spans multiple rows, need to correctly calculate whitespace and trim appropriately
* Use System.Span<int> and C# 7.2 language in SMA
* Added new ref assemblies to Files.wxs
refactor tests to remove similar xml content
added single column test case
Clean up workflow logic in the module loading component.
Workflow module is not supported in PSCore.
Currently, Import-Module throws a terminating error when seeing .xaml modules. After the change, Import-Module throws a non-terminating error when seeing .xaml modules.
This PR fixes the logging issue on Linux where logging is initialized before `-settingsFile` is parsed causing custom log settings to be ignored. (see ConsoleHost.cs and ManagedEntrance.cs)
The PR also includes basic logging tests for Linux and MacOS. PSSyslog.psm1 contains the functions to retrieve selected logged items (based on PowerShell's log id and a timestamp) and Logging.Tests.ps1 contains tests for Linux and MacOS.
Fix error in windows provider when the environment has accidental duplicates that differ only by case.
Make the provider storage for the environment on windows ignore duplicates and only report the effective value.
Add tests to verify existing environment get-item behavior and to ensure that Get-Item env:<var> reports the same as $env:<var>, namely the effective value.
Fixes#6305 and supersedes #6320 based on discussion in #6460.
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
* commands: make rvpa -relative do not return ./absolute_path
This happens on Windows when $pwd and -path is on different drive
* only return relative path inside current root
1. Add a null check in the tab completion code on the binding result returned from `PseudoParameterBinder`;
2. Add a null check in `CommandDiscovery.LookupCommandProcessor` on the `CommandInfo` object returned from the method `LookupCommandInfo`.
For a PropertyOnlyAdapter, the property may come from various sources, but methods, including parameterized properties, still come from DotNetAdapter. So, the binder can optimize on method calls for objects that map to a custom PropertyOnlyAdapter.
Add support for replacement lambdas when using the -replace operator.
Requires minimal changes to existing code by using the following overload:
Regex.Replace(string input, MatchEvaluator evaluator)
when a ScriptBlock is passed in as the replacement argument.
Also remove a couple of language tests which were actually duplicated
Change the one loop which loops through test cases to include an iteration number to remove test name duplication