How to get the file from virtual link

Jul 21, 2015 at 10:22 AM
Edited Jul 21, 2015 at 10:24 AM

I'm facing the problem:
my sourceCode using
http_client client(U("http://localhost/link/24de384d3ds566as3.aspx"));
by this way I can't get the image. so anyone can help me how to get the image via the virtual link "http://localhost/link/24de384d3ds566as3.aspx"

Jul 21, 2015 at 10:05 PM
Hi coiphim2511,

Our behavior with automatic redirection isn't entirely consistent across all the platforms. What platform are you using? For example on Windows desktop we build on WinHttp which by default has redirection automatically handled. Here is a prior discussion post explaining as well.

Jul 22, 2015 at 12:18 AM
Hi Stevetgates,
On windows ok, this issue on Mac os

Jul 22, 2015 at 12:20 AM
Ok then the reason is we don't have automatic redirection in our Boost.Asio based {"http_client"} implementation. You will have to examine the response and make a new request to the link.

Either that or consider adding automatic redirection support. All of the changes would probably only need to be in http_client_asio.cpp.