473,657 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Content-Disposition: "inline" vs. "extension-token"

Please redirect me if this message is posted to the wrong group.

Given the intention of delivering content to an HTTP user agent (such
as Internet Explorer) which is to be immediately opened by an
associated application, there are the Content-Disposition type options
of "inline" or "extension-token". Specifically as regards Internet
Explorer, I've tried both inline and the specific filename extension
(xls,csv,pdf,do c,...) and the browser handling is the same for both
types: the browser opens the associated application. For other
extensions (zip,ppt,...) where the browser is unable or unwilling to
directly open an associated application, it issues a Save-As-or-Open
dialog.

I've also tested the above with Firefox and see the same behavior:
both "inline" and "extension-token" are handled the same way.

Can anyone advise whether or not there would be any situations where a
difference would be seen in the UA behavior, with respect to using
"inline" versus the specific extension?

Thanks in advance.

-Dave H.

Jun 20 '07 #1
12 11533
On Wed, 20 Jun 2007, Dave H. wrote:
Please redirect me if this message is posted to the wrong group.
Perhaps
<news:comp.info systems.www.bro wsers.ms-windows>
<news:comp.info systems.www.ser vers.ms-windows>
<news:comp.info systems.www.ser vers.unix>
Given the intention of delivering content to an HTTP user agent (such
as Internet Explorer) which is to be immediately opened by an
associated application,
You should rather leave this decision to the reader, i.e. open
in browser or open in another program.
Specifically as regards Internet
Explorer, I've tried both inline and the specific filename extension
(xls,csv,pdf,do c,...)
There are no "filename extensions" on the web. There is only
"Content-Type".

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell
Jun 21 '07 #2
On Jun 21, 4:49 am, Andreas Prilop <AndreasPrilop2 ...@trashmail.n et>
wrote:
On Wed, 20 Jun 2007, Dave H. wrote:
Please redirect me if this message is posted to the wrong group.

Perhaps
<news:comp.info systems.www.bro wsers.ms-windows>
<news:comp.info systems.www.ser vers.ms-windows>
<news:comp.info systems.www.ser vers.unix>
Thanks.
Given the intention of delivering content to an HTTP user agent (such
as Internet Explorer) which is to be immediately opened by an
associated application,

You should rather leave this decision to the reader, i.e. open
in browser or open in another program.
Assuming that by "reader" you mean the user of the UA, then I probably
should have specified that my post concerns an intranet web
application which provides both a download and an open button, and the
question regards how the CGI behind the open button structures its
HTTP headers. The application is required to store data in encrypted
format and not use any temporary files to decrypt data for web
availability; therefore it must deliver data inline directly from the
standard output of openssl.
Specifically as regards Internet
Explorer, I've tried both inline and the specific filename extension
(xls,csv,pdf,do c,...)

There are no "filename extensions" on the web. There is only
"Content-Type".
I am referring to "extension-token" as described by RFC 2183 which
governs the Content-Disposition header. Granted it was written with
email attachments in mind; however, unless I am mistaken, use of the
Content-Disposition header in HTTP also conforms to this standard.

--
In memoriam Alan J. Flavellhttp://groups.google.c om/groups/search?q=author :Alan.J.Flavell
-Dave H.

Jun 21 '07 #3
Scripsit Dave H.:
I probably
should have specified that my post concerns an intranet web
application
Indeed. Now your question was thus off-topic without even revealing it.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Jun 21 '07 #4
On Jun 21, 4:28 pm, "Jukka K. Korpela" <jkorp...@cs.tu t.fiwrote:
Scripsit Dave H.:
I probably
should have specified that my post concerns an intranet web
application

Indeed. Now your question was thus off-topic without even revealing it.
Which was why my first statement was "Please redirect me if this
message is posted to the wrong group".

However, I am curious to find out why you consider a question about an
intranet web application to be off-topic in this group, but when the
exact environment was unknown the post was apparently more suitable.
--
Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
-Dave H.

Jun 21 '07 #5
On Wed, 20 Jun 2007 16:50:59 -0000, "Dave H." <dh****@gmail.c om>
wrote:
>Can anyone advise whether or not there would be any situations where a
difference would be seen in the UA behavior, with respect to using
"inline" versus the specific extension?
When the RFC cites "extension-token" it means "some other value that
extends this definition". It defines "inline" as the only official
value for Content-Disposition.

In practice there is also the value "attachment ", which suggests to
the UA that it should do some sort of "Save As" instead of attempting
to display the item directly.

This works in Internet Explorer and in Firefox. Suggesting the
filename to "Save As", though, doesn't work in Internet Explorer. IE
uses whatever filename is served, which can get annoying very quickly
when you have a CGI script doing the serving.

Suggest a filename via
Content-Disposition: attachment; filename=file.e xt

If anyone knows how to get IE to recognize the suggested filename,
please share with the class. It's been irritating me since IE5.
Jun 22 '07 #6
Scripsit Dave H.:
>Indeed. Now your question was thus off-topic without even revealing
it.

Which was why my first statement was "Please redirect me if this
message is posted to the wrong group".
That was a wrong question. _You_ are supposed to decide on the group before
posting. It's just rude to jump into a public forum on (say) cats and ask a
question about (say) cows and add a request like that, especially when the
forum is rather crowded.
However, I am curious to find out why you consider a question about an
intranet web application to be off-topic in this group, but when the
exact environment was unknown the post was apparently more suitable.
You had your chance of being treated just as ignorant, but you seem to wish
to turn that into bad reputation. I'm afraid your plonk rate is going up
fast.

Any question here is treated as WWW related until proven otherwise. Anyone
should understand this from the group name. It often happens that people ask
here something, get an answer that is fairly correct in WWW terms (e.g.,
"you can't"), then start explaining that they won't take that as an answer,
_because_ they have an intranet bla bla bla.

If you get the hint, you might stop now, and maybe we might have something
to discuss about HTML authoring for the WWW in future.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jun 22 '07 #7
On Jun 22, 6:24 am, "Jukka K. Korpela" <jkorp...@cs.tu t.fiwrote:
Scripsit Dave H.:
Indeed. Now your question was thus off-topic without even revealing
it.
Which was why my first statement was "Please redirect me if this
message is posted to the wrong group".

That was a wrong question. _You_ are supposed to decide on the group before
posting. It's just rude to jump into a public forum on (say) cats and ask a
question about (say) cows and add a request like that, especially when the
forum is rather crowded.
However, I am curious to find out why you consider a question about an
intranet web application to be off-topic in this group, but when the
exact environment was unknown the post was apparently more suitable.

You had your chance of being treated just as ignorant, but you seem to wish
to turn that into bad reputation. I'm afraid your plonk rate is going up
fast.

Any question here is treated as WWW related until proven otherwise. Anyone
should understand this from the group name. It often happens that people ask
here something, get an answer that is fairly correct in WWW terms (e.g.,
"you can't"), then start explaining that they won't take that as an answer,
_because_ they have an intranet bla bla bla.

If you get the hint, you might stop now, and maybe we might have something
to discuss about HTML authoring for the WWW in future.

--
Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/

Jukka, after having scanned back a few weeks worth of posts here, it
now becomes clear why you are at times considered to be a boorish know-
it-all and one of the self-anointed newsgroup purity police. I've
been reading Usenet for close to 20 years and have seen a great many
highly intelligent people (most CS profs or PHDs, as you probably are)
manage to interact with people they perceive to be of lesser
intelligence in a respectful manner. Likewise, I've seen a
(thankfully lesser) number of self-impressed blowhards who seem to
feel the only way to deal with those below their IQ range and
technical capability is with disdain and impatience. Clearly, the
later group has emotional issues that seem to come to the fore when
they feel their time has been wasted by some lesser being. Sad.

As for the specific issues you commented on, I'll just say that I
chose this group because among those groups which had prior posts
relating to my questions, this was the only one with a significant
number of subscribers and fairly recent traffic. As for the WWW
versus Intranet bullsh*t, that's clearly just you being you. Whether
on the public Internet or a private Intranet, the same server
equipment runs the same software, which use the same rule sets and
protocols to deliver the same content which is composed of the same
coding structures. Just because one is inside a firewall and one
outside doesn't mean a thing in discussion of HTML authoring. And if
you weren't so in need of proving what a dolt I am, you would probably
not even give it a second thought.

-Dave H.

Jun 22 '07 #8
Dave H. wrote:
Jukka, after having scanned back a few weeks worth of posts here, it
now becomes clear why you are at times considered to be a boorish know-
it-all and one of the self-anointed newsgroup purity police.
Isn't "troll" a Finnish curiosity? :-]

I have similar problems like you, not knowing in which group I could
find answers to my problems at all. If everybody only would respond "OT
here!", one never has a chance to get an answer. But fortunately other
people (the majority, I think) will also give constructive advice on OT
topics, if ever possible.

Jukka is one of the typical newgsgroup backbones, with excellent
technical knowledge, at the cost of personal problems. Don't try to
argue, or you'll make them even more angry and aggressive. Sometimes I
feel a need for an target specifier: newsgroup XYZ except ... ;-)

DoDi
Jun 23 '07 #9
On Jun 21, 10:01 pm, Richard Rudie <rsqua...@dont. spam.mewrote:
On Wed, 20 Jun 2007 16:50:59 -0000, "Dave H." <dh1...@gmail.c om>
wrote:

In practice there is also the value "attachment ", which suggests to
the UA that it should do some sort of "Save As" instead of attempting
to display the item directly.

This works in Internet Explorer and in Firefox. Suggesting the
filename to "Save As", though, doesn't work in Internet Explorer. IE
uses whatever filename is served, which can get annoying very quickly
when you have a CGI script doing the serving.

Suggest a filename via
Content-Disposition: attachment; filename=file.e xt

If anyone knows how to get IE to recognize the suggested filename,
please share with the class. It's been irritating me since IE5.
Interesting ... I find the exact reverse to be the case, at least with
IE7 and Firefox 2. When provided with a "filename" parameter, it is
IE that accepts and uses the suggested name to seed the Save As name
field. It is Firefox that ignores the suggested name and uses the
name of the CGI script which served the content.

Given a CGI script "doc_decrypt.cg i" which emits the contents of an MS-
Word document preceded by the headers shown below; IE will seed the
Save As name field with "74.1.doc" and Firefox will seed the field
with "doc_decrypt.cg i":

Content-Type: application/download
Content-Disposition: attachment; filename="74.1. doc"; modification-
date="11 Jun 2007 17:50:01 +0000"
Last-Modified: Mon, 11 Jun 2007 17:50:01 GMT

-Dave H.

Jun 23 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6872
by: kevin | last post by:
Hi, Any help with this would be really appreciated! I'm trying to download a file from a remote server. The access permissions is okay but the problem I'm facing is that the file is getting downloaded before the Save As dialogue appears. As we will be downloading some large files, it's unpractical to have this. So far the code I have to download the file is
2
3385
by: Jeff G. | last post by:
Hello everyone, I have read through the newsgroups (thank God for 'em!) extensively looking for an example of how to pass a file (PDF) from a webresponse stream down to a web client. Here's the scenario - when the web browser requests a file, the IIS Server1 has to go back to Server2 to make a request for the file. Server2 then responds the file back to Server1 and Server1 should be able to just forward the file down to the web browser....
2
2369
by: spammy | last post by:
Hi all, I'm trying to create a text file on the fly for a user of an ASP.NET application to download. So far the code I have is: MemoryStream oStream = null; // using System.IO string contenttype = "text/plain"; string contentdisposition = "filename=report.txt"; oStream = new MemoryStream(); StreamWriter sw = new StreamWriter(oStream);
3
310
by: mpraneetha | last post by:
Hello Everyone, i am creating a compostie control (for web)...which would contain a button "GenerateFile" on click of that button..i should generate a file (which is not a problem) and also send it to the client so that he can open/save from the webpage the control is contained in . if i was doing this in normal web application..i would response.redirect to an other page..which would contain the code to open it..it would contain...
1
5893
by: theWizard1 | last post by:
The following sends my email, but the attachment is empty. The attachment should contain the data that is in the string that was created from the xmlReader. I have a stored procedure written using For XML explicit, and it returns an xml reader. Then the following: xmlRdr.MoveToContent(); string myTemp = xmlRdr.ReadOuterXml();
3
4966
by: TomislaW | last post by:
I am sending word document with e-mail from asp.net 2.0 application. I read doc file like this:FileStream fs = System.IO.File.Open(docPath,FileMode.Open,FileAccess.Read,FileShare.Read); Then create message: MailMessage message = new MailMessage("mail@company.com", email); message.Subject = "Subject"; message.Body = ""; ContentType ct = new ContentType("application/vnd.ms-word"); Attachment data = new Attachment(ms,ct);
8
19782
by: kcovert | last post by:
using System.Net.Mail; I've been unable to get a carriage return/line feed into the body of my Outlook message. Have look all over the web for a soltion with no luck. Here's what I have tried already, code is in a loop.., //body += "%0A" + txtMessage.Text.Substring(CurPos, 1); //body += "<CF><LF>" + " " +txtMessage.Text.Substring(CurPos, 1); //body += "'CRLF:\r\nPost CRLF'" + txtMessage.Text.Substring(CurPos, 1); //body += "<br>" +...
3
8007
by: narinder2 | last post by:
I have an Access database (images.mdb) that has 2 columns: one is the id of the picture (an integer) and one (column named picture) is a field of type OLE Object which contains an image stored as on OLE Object (it can store jpg, bmp, gif, but I don't know what image is stored inside). I want to retrieve the picture stored in the database and identified by a given id and display it in a web page (.aspx). I write in Visual C# , but it does...
11
3496
by: Ed Bitzer | last post by:
I have been able using the namespace System.Web.Mail and its method Smtp.mail.send to mail simple text messages to a small group within our 55 and older community. I need help expanding the programs capabilities. Searching this forum I did not find any related information so if I have chosen poorly, I would appreciate a suggestion of a more appropriate dotnet forum. Now what I wish is the ability to send bcc's rather than to: (would be...
6
9201
by: Chocolade | last post by:
Hi, Im using System.Net.Mail to send email in my application it was working great without any problems untill this morning after like 20-30 tries it was sending the email ok then suddenly this morning i got an exception and i cant figure out what/where the problem is and how to fix it. The problem say i have some invalid char: invalid character was found in the mail header: 'י'. Now this char 'י' is an hebrew letter. But i searched...
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7333
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.