FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Generating "download" pages
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Generating "download" pages [message #186413 is a reply to message #186412] Sat, 19 July 2014 20:06 Go to previous messageGo to previous message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma:
Senior Member
Thomas 'PointedEars' Lahn wrote:

> Christoph M. Becker wrote:
>
>> and AFAIK there is no such thing as multipart responses for HTTP.
>
> There is; that is the purpose of the “Content-Disposition” header field.
>
> <http://tools.ietf.org/html/rfc6266>

Um, I am somewhat confused. RFC 6266 says (emphasis mine):

| The Content-Disposition response header field is used to convey
| additional information about *how to process the response payload*,
| and also can be used to attach additional metadata, such as the
| filename to use when *saving the response payload locally*.

This seems to be completely different then e.g. "Content-Type:
multipart/alternative" for emails.

> | Response Headers (source)
> |
> | HTTP/1.1 302 Found
> | Location:
> http://netcologne.dl.sourceforge.net/project/viplugin/viplugin/0.2.11/viPlu gin_0.2.11_E30.zip
>
> Note that the response body is displayed as empty.

This is not surprising, as the HTTP response status code is "302 Found",
which redirects to the URI given in the Location header field.

> I think the relevant fact here is that the target resource is served with
> “Content-Type: application/octet-stream”, because that is known to trigger a
> download dialog instead of navigation.

ACK. However, the content that could be saved, is the payload of the
very response that contained the Content-Type header field.

> <http://stackoverflow.com/questions/283752/refresh-http-header>

Thanks for the confirmation.

[Sorry, I had to snip more of the former discussion than I liked,
because my newsserver doesn't allow too much quoted content.]

--
Christoph M. Becker
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Resolved: Generating "download" pages
Next Topic: Your opinion on which technologies to use when building web applications
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Dec 21 16:01:56 GMT 2024

Total time taken to generate the page: 0.04105 seconds