J
Jonathan Wood
Greetings,
I'm using WebRequest and WebResponse to download files from the Web. One
thing I need to do is detect redirection and get the real name of the file
that is actually downloaded.
I see that HttpWebResponse has a StatusCode property that indicates if the
request was redirected or other status codes. However, I need my code to
support FTP as well so I'm thinking I can't use HttpWebResponse, but
WebResponse has no such property.
Does anyone have any idea how I'd detect the actual name of the file
downloaded with WebRequest and WebResponse? I looked at WebResponse.Headers
but didn't see any information like this.
Thanks.
Jonathan
I'm using WebRequest and WebResponse to download files from the Web. One
thing I need to do is detect redirection and get the real name of the file
that is actually downloaded.
I see that HttpWebResponse has a StatusCode property that indicates if the
request was redirected or other status codes. However, I need my code to
support FTP as well so I'm thinking I can't use HttpWebResponse, but
WebResponse has no such property.
Does anyone have any idea how I'd detect the actual name of the file
downloaded with WebRequest and WebResponse? I looked at WebResponse.Headers
but didn't see any information like this.
Thanks.
Jonathan