dotnet / core

.NET news, announcements, release notes, and more!
https://dot.net
MIT License
20.69k stars 4.86k forks source link

"winget instructions" link redirects to Russian translation #9358

Open KalleOlaviNiemitalo opened 2 weeks ago

KalleOlaviNiemitalo commented 2 weeks ago

At https://dotnet.microsoft.com/en-us/download/dotnet/9.0, when I click the "winget instructions" link https://learn.microsoft.com/dotnet/core/install/windows?WT.mc_id=dotnet-35129-website#install-with-windows-package-manager-winget, it unexpectedly redirects to the Russian-language web page https://learn.microsoft.com/ru-ru/dotnet/core/install/windows?WT.mc_id=dotnet-35129-website&tabs=net80#install-with-windows-package-manager-winget, despite Russian not being configured as an accepted language in the Web browser.

Browser: Microsoft Edge for Business, "Versio 125.0.2535.92 (Virallinen koontiversio) (64-bittinen)"

Configured languages in the browser settings:

  1. Finnish
  2. English
  3. English (United Kingdom)
  4. English (United States)
  5. Italian (Italy)
  6. Swedish
  7. German (Germany)

I see a similar Russian redirection even if I run curl with only Accept-Language: en-us:

curl --header "Accept-Language: en-us" --head "https://learn.microsoft.com/dotnet/core/install/windows?WT.mc_id=dotnet-35129-website"
HTTP/1.1 301 Moved Permanently
Content-Length: 0
Location: /ru-ru/dotnet/core/install/windows?WT.mc_id=dotnet-35129-website
request-context: appId=cid-v1:
Content-Security-Policy: default-src *;script-src 'self' 'unsafe-inline' 'unsafe-eval' *.microsoft.com js.monitor.azure.com dc.services.visualstudio.com try-ppe.dot.net aznb-ame-prod.azureedge.net client-api.arkoselabs.com;style-src 'self' 'unsafe-inline' *.microsoft.com aznb-ame-prod.azureedge.net try-ppe.dot.net;img-src * data: blob:;frame-ancestors docs.microsoft.com *.docs.microsoft.com learn.microsoft.com *.learn.microsoft.com labclient.labondemand.com portal.azure.com *.portal.azure.com portal.azure.us portal.azure.cn *.onecloud.azure-test.net *.sharepoint.com localhost:3000;worker-src 'self' blob: *.microsoft.com;form-action 'self' *.microsoft.com *.azure.cn;media-src 'self' blob: *.microsoft.com *.azure.cn;base-uri 'self';font-src 'self' https: data:;object-src 'none';script-src-attr 'none';upgrade-insecure-requests
Cross-Origin-Opener-Policy: unsafe-none
Cross-Origin-Resource-Policy: cross-origin
Origin-Agent-Cluster: ?1
Referrer-Policy: strict-origin-when-cross-origin
X-Content-Type-Options: nosniff
X-DNS-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 0
x-datacenter: East US
x-buildversion: 0.4.027195279
x-azure-ref: 20240613T125111Z-154fffddb4574s2qt5154yt7rn000000009g00000000arn2
nel: {"report_to":"network-errors","max_age":604800,"success_fraction":0.01,"failure_fraction":1.0}
report-to: {"group":"network-errors","max_age":604800,"endpoints":[{"url":"https://mdec.nelreports.net/api/report?cat=mdocs"}]}
Cache-Control: public, max-age=810
Expires: Thu, 13 Jun 2024 13:22:06 GMT
Date: Thu, 13 Jun 2024 13:08:36 GMT
Connection: keep-alive
Akamai-Cache-Status: Redirect from child
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

However, if I omit the ?WT.mc_id=dotnet-35129-website query from the request URL, leaving only https://learn.microsoft.com/dotnet/core/install/windows, then it redirects to /en-us/dotnet/core/install/windows.

mairaw commented 2 weeks ago

Thanks for reporting the issue @KalleOlaviNiemitalo. I have opened an internal ticket for the learn team.

KalleOlaviNiemitalo commented 1 week ago

I see a similar Russian redirection chain at:

  1. https://aka.ms/pscore6Location: https://learn.microsoft.com/powershell/scripting/install/installing-powershell
  2. https://learn.microsoft.com/powershell/scripting/install/installing-powershellLocation: /ru-ru/powershell/scripting/install/installing-powershell
  3. https://learn.microsoft.com/ru-ru/powershell/scripting/install/installing-powershellLocation: /ru-ru/powershell/scripting/install/installing-powershell?view=powershell-7.4

so it's not specific to .NET documentation.