How to get the file from virtual link

Jul 21, 2015 at 9:22 AM
Edited Jul 21, 2015 at 9: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 9: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 21, 2015 at 11:18 PM
Hi Stevetgates,
On windows ok, this issue on Mac os

Jul 21, 2015 at 11:20 PM
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.