Title: Invoke-Restmethode won't timeout · Issue #12249 · PowerShell/PowerShell · GitHub
Open Graph Title: Invoke-Restmethode won't timeout · Issue #12249 · PowerShell/PowerShell
X Title: Invoke-Restmethode won't timeout · Issue #12249 · PowerShell/PowerShell
Description: Steps to reproduce Hello, i got this code here for demonstration: Invoke-RestMethod -uri "https://XXXXXX.blob.core.windows.net/XXXXXXXX/XXXXXX/SOURCES/PE10.WIM?st=2020-02-20T13:08:43Z&se=2021-02-21T13:08:00Z&sp=racwdl&sv=2018-03-...
Open Graph Description: Steps to reproduce Hello, i got this code here for demonstration: Invoke-RestMethod -uri "https://XXXXXX.blob.core.windows.net/XXXXXXXX/XXXXXX/SOURCES/PE10.WIM?st=2020-02-20T13:08:43Z&se=2021-0...
X Description: Steps to reproduce Hello, i got this code here for demonstration: Invoke-RestMethod -uri "https://XXXXXX.blob.core.windows.net/XXXXXXXX/XXXXXX/SOURCES/PE10.WIM?st=2020-02-20T13:08:43Z&...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/12249
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Invoke-Restmethode won't timeout","articleBody":"\u003c!--\r\n\r\nFor Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead:\r\nWindows PowerShell [UserVoice](https://windowsserver.uservoice.com/forums/301869-powershell)\r\n\r\nThis repository is **ONLY** for PowerShell Core 6 and PowerShell 7+ issues.\r\n\r\n- Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- Search the existing issues.\r\n- Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- Refer to the [known issues](https://docs.microsoft.com/powershell/scripting/whats-new/known-issues-ps6?view=powershell-6).\r\n\r\n--\u003e\r\n\r\n# Steps to reproduce\r\n\r\nHello,\r\n\r\ni got this code here for demonstration:\r\n\r\n`Invoke-RestMethod -uri \"https://XXXXXX.blob.core.windows.net/XXXXXXXX/XXXXXX/SOURCES/PE10.WIM?st=2020-02-20T13%3A08%3A43Z\u0026se=2021-02-21T13%3A08%3A00Z\u0026sp=racwdl\u0026sv=2018-03-28\u0026sr=b\u0026sig=SIGNATURE\" -OutFile \"C:\\Users\\testUser\\Downloads\\DL\\PRG\\test.wim\"`\r\n\r\nwhen i use that code i can get the download.\r\nFirstly to maybe make clear what the parameter TimeoutSec should do. i thought it the connection stops i get an timeout after 10 seconds? or do i get an timeout after 10 seconds when i cant get an answer ?\r\n\r\nTo the problem: when i use that code above the download starts with Powershell 7. When i unplug my Lan cable when the download is already progressing, i can reattach the cable in maybe 10 seconds and the download resumes. when i leave it unpluged this happens:\r\n\r\nin Powershell 5: i get an timeout after 5 minutes. and the script goes on (thats what i want)\r\nin Powershell 7: nothing happens, waiting 5, 10 minutes, even hours (tested till 1 day) and its stuck. also the script is stuck and wont progress anymore\r\n\r\n# Expected behavior\r\n\r\n- after the connection is lost during an download (or cable is unpluged) a timeout should happen after 5 minutes, like it happens in Powershell 5\r\n\r\n```\r\n\r\n# Actual behavior\r\n\r\n- Powershell 7 is stuck during the download when cable is unpluged. Script hangs forever\r\n\r\n```\r\n\r\n# Environment data\r\n\r\n\u003c!-- provide the output of $PSVersionTable --\u003e\r\n\r\n```none\r\n\r\n```\r\n","author":{"url":"https://github.com/KrX3D","@type":"Person","name":"KrX3D"},"datePublished":"2020-04-03T13:03:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":22},"url":"https://github.com/12249/PowerShell/issues/12249"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4933ecfa-51fd-41eb-ac44-cdc8559741f2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B0D2:2624ED:1F945ED:2DBBE95:6A54ED1F |
| html-safe-nonce | 6b8463ecf8925625ed43b84e263492e5da5ff724379081586c152cfbacb9257d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMEQyOjI2MjRFRDoxRjk0NUVEOjJEQkJFOTU6NkE1NEVEMUYiLCJ2aXNpdG9yX2lkIjoiMzk5MTQ0OTE0NDQ1NTkxNjgzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | faa3e7ef7e1e338b1c8f4fb14480a62e452808697383199ba68b15e18b9d5192 |
| hovercard-subject-tag | issue:593367106 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/12249/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cf3dd33e8332d9b1fa71037f663f63f60c48c0dc92de6a42f7a803baaeac028f/PowerShell/PowerShell/issues/12249 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cf3dd33e8332d9b1fa71037f663f63f60c48c0dc92de6a42f7a803baaeac028f/PowerShell/PowerShell/issues/12249 |
| og:image:alt | Steps to reproduce Hello, i got this code here for demonstration: Invoke-RestMethod -uri "https://XXXXXX.blob.core.windows.net/XXXXXXXX/XXXXXX/SOURCES/PE10.WIM?st=2020-02-20T13:08:43Z&se=2021-0... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KrX3D |
| hostname | github.com |
| expected-hostname | github.com |
| None | eae2aab99907699a22d2c8449aa683ca74454fca87211b98f7c7b722086b2839 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bb1b4ffdc07c66de20ad344214f55df0aa364bd3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width