C�dric,

You could write something like this, as we have done.

 /some-path/getbyidservice/93847572934/foo-filename.jpg

We have done this in Perl, and will be attacking this in servlets 1st week 
February.

This allows the browser to cache (if allowed by headers) and to have the 
extension/filename set as intended.

If you want to encode more details in the request, i don't see why you 
cannot introduce delimiters into the id path element.

-jason pyeron

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                   http://www.pyerotechnics.com   -
- Owner & Lead                  Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c)           500 West University Parkway #1S -
- +1 410 467 2266 (f)           Baltimore, Maryland  21210-3253 -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.


On Thu, 9 Jan 2003, C�dric Viaud wrote:

Hi,

i would like to know if it is possible to indicate in the HTTP header of a response a 
name for a ressource.

Let be a little clearer.

I got a controler servlet wich map all request with "*.do". I check the URL use the 
name before the ".do" to know the command.
For exemple, if the request is "getRequest.do", my servlet look for what to do with 
"getRequest".

My problem is that i use this servlet to serve native contents (such as images, video, 
etc ...). On request like "getNativeContent.do?id=42135125", my servlet look for the 
native content of id=42135125, and send it back to the client. I set the correct 
"content-type" and use a ServletOutputStream to send binary content.

It works fine, but i've got a light problem. It seem's that the content type is not 
always used by the client to know wich application must be run, but the file name is 
used (the extension of this filename). Or, the filename that the client see is 
"getNativeContent.do" and so the extension is "do". In this case, the user is prompted 
for which application must be associated with the ".do" extension. More that this, if 
the user want to save it to disk, the defaut name is "getNativeContent.do".

Is there a way to indicate a name for the ressource beeing served to the client ? I've 
spent much time on the HTTP RFC, be i can't manage to find what i'm looking for.

Sorry for my awfull English.

Regards,

    C�dric





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to