cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to get the original filename of a downloading file.

From: 王 臻 <writewang_at_hotmail.com>
Date: Thu, 10 Oct 2002 19:16:12 +0800

Dear Stenberg:
  I know there's no original filename associated with a URL. But if a URI
is directly linked to a file, such as
http://www.someserver.com/download.zip. We know it is a zip file and named
as "download.zip". But bucause jsp and asp use middle ware, the middle
layer server receives our request and gets a file from other place differ
from the original URL such as "http://www.someserver.com/request01.jsp". My
question is , how to get the filename when the stream arrives. Thanks.

>From: Daniel Stenberg <daniel_at_haxx.se>
>Reply-To: curl-library_at_lists.sourceforge.net
>To: libcurl Mailing list <curl-library_at_lists.sourceforge.net>
>Subject: Re: How to get the original filename of a downloading file.
>Date: Thu, 10 Oct 2002 09:13:40 +0200 (MET DST)
>
>On Thu, 10 Oct 2002, [gb2312] 王 臻 wrote:
>
> > I found some server use asp and jsp, and some URIs are indicated as
> > http://www.someserver.com/xxx.jsp. When I send a request to that URI,
it
> > returns a file. But how do I get the filename? Thanks in advance.
>
>There is no "original filename" associated with a URL, so there's no
standard
>way of getting it.
>
>--
> Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf

_________________________________________________________________
享用世界上最大的电子邮件系统— MSN Hotmail。http://www.hotmail.com/cn

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-10