Re: Downloading file AGAIN.

2001-10-15 Thread $Bill Luebkert

Rodney Wines wrote:
> 
> > > http://mysite.com/myscript.cgi/path/to/my/file?any=extra+cgi+params
> >   --^
> >
> > When using PATH_INFO, you use / instead of ? to start the arg list:
> >
> > http://mysite.com/myscript.cgi/relativepathtomy/script/any=extra+cgi+params
> 
> Definately "yes and no" ...
> 
> It's true that you use "/" to specify PATH_INFO, but you do not have to use
> it instead of  "?".  You can use it in addition to as well.  In the example
> above, I'm assuming that the CGI script is:
> 
> http://mysite.com/myscript.cgi
> 
> Then, "/path/to/my/file" shows up in $ENV{PATH_INFO}, and
> "any=extra+cgi+params" shows up in $ENV{QUERY_STRING}.  In your example,
> everything shows up in $ENV{PATH_INFO}, and there'd be an extra step to split
> out the parameters.  Both methods work, however.

My mistake - I misread the orig path.  Yes the orig path should set both 
PATH_INFO and QUERY_STRING the way it was written.  I'm not sure which 
one will be more acceptable to MSIE which is the guy that is usually so 
hard to get to set the download name properly.

-- 
  ,-/-  __  _  _ $Bill Luebkert   ICQ=14439852
 (_/   /  )// //   DBE Collectibles   Mailto:[EMAIL PROTECTED] 
  / ) /--<  o // //  http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_http://www.todbe.com/
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Downloading file AGAIN.

2001-10-15 Thread Rodney Wines

> > http://mysite.com/myscript.cgi/path/to/my/file?any=extra+cgi+params
>   --^
>
> When using PATH_INFO, you use / instead of ? to start the arg list:
>
> http://mysite.com/myscript.cgi/relativepathtomy/script/any=extra+cgi+params

Definately "yes and no" ...

It's true that you use "/" to specify PATH_INFO, but you do not have to use
it instead of  "?".  You can use it in addition to as well.  In the example
above, I'm assuming that the CGI script is:

http://mysite.com/myscript.cgi

Then, "/path/to/my/file" shows up in $ENV{PATH_INFO}, and
"any=extra+cgi+params" shows up in $ENV{QUERY_STRING}.  In your example,
everything shows up in $ENV{PATH_INFO}, and there'd be an extra step to split
out the parameters.  Both methods work, however.

Rodney

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Downloading file AGAIN.

2001-10-15 Thread $Bill Luebkert

"Morse, Richard E" wrote:
> 
> I'm not sure about it cutting off, but handling the naming issue of the download
> is something that I've dealt with before -- basically, most browsers are going
> to save the file by the name of the page they are getting it from.  The trick is
> to fool the browsers into believing that they are downloading something by the
> name of the file you want.  Happily, the HTTP specification includes the ability
> to pass extra path info.  It's been a while since I wrote the code to do this,
> so I don't remember all of it, but basically, you want something that you call
> like this:
> 
> http://mysite.com/myscript.cgi/path/to/my/file?any=extra+cgi+params
  --^

When using PATH_INFO, you use / instead of ? to start the arg list:

http://mysite.com/myscript.cgi/relativepathtomy/script/any=extra+cgi+params

> Then myscript.cgi looks at an environment variable (whose exact name I can't
> remember off the top of my head, but is something like $ENV{'PATH_INFO'}) to
> determine which file to send back.

-- 
  ,-/-  __  _  _ $Bill Luebkert   ICQ=14439852
 (_/   /  )// //   DBE Collectibles   Mailto:[EMAIL PROTECTED] 
  / ) /--<  o // //  http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_http://www.todbe.com/
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users