Closed
Description
@jdelrue commented on Thu Feb 01 2018
General
Operating system 1: Windows 10
Operating system 2: Ubuntu (16.04 or 17.04)
Execute:
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace redirtest
{
class Program
{
static void Main(string[] args)
{
var res = Task.Run(async () => await method());
res.Wait();
}
public static async Task method()
{
using (var client = new HttpClient(new HttpClientHandler
{
AllowAutoRedirect = true
}))
{
var connect = await client.GetAsync("http://www.jimber.org/redirect.php");
var requestUri = connect.RequestMessage.RequestUri.AbsoluteUri;
Console.WriteLine(requestUri);
}
}
}
}
Output Windows: http://www.google.be/#youdontgetthisinlinux
Output Linux: http://www.google.be/
Expected output is the Windows version. Workaround: Disable autoredirect and read location header.