Content-Disposition: attachment/inline: Question http protocol - TCP-IP

This is a discussion on Content-Disposition: attachment/inline: Question http protocol - TCP-IP ; Hello Group members, Could some one tell me how does the Content_Dispositin header is interpreted on the server side. I understand, if I want to send the stream buffer I would use Content-Disposition: inline and if I want to send ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Content-Disposition: attachment/inline: Question http protocol

  1. Content-Disposition: attachment/inline: Question http protocol

    Hello Group members,

    Could some one tell me how does the Content_Dispositin header is
    interpreted on the server
    side.

    I understand, if I want to send the stream buffer I would use

    Content-Disposition: inline

    and if I want to send a file "a.b" and I want server to save this file
    on the server in
    filename "abcde" then I will send the file content as buffer and
    include the following
    header

    Content-Disposition: attachment; filename=abcde;

    I want the server to echo the content of the buffer and save the file
    in the filename variable.
    What more could I do?????

    I am successful using the form, but this is not what I want to do. I
    want to telnet to the server
    which can take the post request and follow my wishes.

    I know the name the script, which I must specify, however I do not know
    the content of those
    scripts.

    Thanks in advance.

    nagrik


  2. Re: Content-Disposition: attachment/inline: Question http protocol

    In article <1157676270.541839.303180@b28g2000cwb.googlegroups. com>,
    "Vinay Nagrik" wrote:

    > Hello Group members,
    >
    > Could some one tell me how does the Content_Dispositin header is
    > interpreted on the server
    > side.
    >
    > I understand, if I want to send the stream buffer I would use
    >
    > Content-Disposition: inline
    >
    > and if I want to send a file "a.b" and I want server to save this file
    > on the server in
    > filename "abcde" then I will send the file content as buffer and
    > include the following
    > header
    >
    > Content-Disposition: attachment; filename=abcde;
    >
    > I want the server to echo the content of the buffer and save the file
    > in the filename variable.
    > What more could I do?????
    >
    > I am successful using the form, but this is not what I want to do. I
    > want to telnet to the server
    > which can take the post request and follow my wishes.
    >
    > I know the name the script, which I must specify, however I do not know
    > the content of those
    > scripts.


    I don't think Content-Disposition makes any sense for HTTP. HTTP
    doesn't have the concept of attachments, it's only relevant when using
    MIME for message-oriented applications like mail.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  3. Re: Content-Disposition: attachment/inline: Question http protocol

    On Fri, 08 Sep 2006 21:03:17 -0400, Barry Margolin wrote:

    > In article <1157676270.541839.303180@b28g2000cwb.googlegroups. com>,
    > "Vinay Nagrik" wrote:
    >
    >> Hello Group members,
    >>
    >> Could some one tell me how does the Content_Dispositin header is
    >> interpreted on the server
    >> side.


    You are probably confused between uploads and downloads, see the link
    below.

    > I don't think Content-Disposition makes any sense for HTTP. HTTP
    > doesn't have the concept of attachments, it's only relevant when using
    > MIME for message-oriented applications like mail.


    It is parsed by all major webbrowsers, in the format above, as a "this
    is a good name for the filename".

    It is also used as a hint by webservers with the "multipart/form-data"
    content-type, for uploads (with a very different format).

    See: http://www.htmlcodetutorial.com/forms/form_enctype.html

    --
    James Antill -- james@and.org
    http://www.and.org/and-httpd


  4. Re: Content-Disposition: attachment/inline: Question http protocol

    In article ,
    James Antill wrote:

    > On Fri, 08 Sep 2006 21:03:17 -0400, Barry Margolin wrote:
    >
    > > In article <1157676270.541839.303180@b28g2000cwb.googlegroups. com>,
    > > "Vinay Nagrik" wrote:
    > >
    > >> Hello Group members,
    > >>
    > >> Could some one tell me how does the Content_Dispositin header is
    > >> interpreted on the server
    > >> side.

    >
    > You are probably confused between uploads and downloads, see the link
    > below.
    >
    > > I don't think Content-Disposition makes any sense for HTTP. HTTP
    > > doesn't have the concept of attachments, it's only relevant when using
    > > MIME for message-oriented applications like mail.

    >
    > It is parsed by all major webbrowsers, in the format above, as a "this
    > is a good name for the filename".
    >
    > It is also used as a hint by webservers with the "multipart/form-data"
    > content-type, for uploads (with a very different format).
    >
    > See: http://www.htmlcodetutorial.com/forms/form_enctype.html



    You seem to be referring to the filename= option. I was thinking of
    "inline" vs "attachment". And the page you referred to confirms that;
    it doesn't use either of those dispositions, it uses "form-data".

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  5. Re: Content-Disposition: attachment/inline: Question http protocol


    [Reformatted to reasonable line length and breaks.]

    In article <1157676270.541839.303180@b28g2000cwb.googlegroups. com>, "Vinay Nagrik" writes:
    >
    > Could some one tell me how does the Content_Dispositin header is
    > interpreted on the server side.


    That would depend on the server, since Content-Disposition is not
    part of the HTTP standard. In fact, RFC 2616 specifically *says*
    that Content-Disposition is not part of HTTP; see 15.5.

    Further discussion of Content-Disposition appears in 19.5.1, but
    that is a) optional; b) applicable only to user-agents, not to
    servers; and c) discouraged for security reasons.

    > I understand, if I want to send the stream buffer I would use
    >
    > Content-Disposition: inline


    I don't know what you think you're doing with this, but it has no
    standard effect in HTTP. I don't know what you mean by "send the
    stream buffer" here.

    > and if I want to send a file "a.b" and I want server to save this
    > file on the server in filename "abcde" then I will send the file
    > content as buffer and include the following header
    >
    > Content-Disposition: attachment; filename=abcde;


    Some servers might use the filename= parameter in this case, if
    this is a PUT request, but they are not required to do so. In
    fact, that would make them non-compliant (at least with HTTP/1.1),
    since it would violate a MUST requirement for PUT (9.6), unless
    the filename happened to match the tail of the Request-URI.

    The resource handling a POST request (which might be the server
    itself, or some other agent acting on behalf of the server) might use
    the contents of the Content-Disposition header, but that's outside
    the HTTP standard.

    > I want the server to echo the content of the buffer and save the file
    > in the filename variable.


    There is no standard HTTP request which mandates, or even suggests,
    this behavior.

    > What more could I do?????


    You could consult the documentation for your server.

    I'll note that you haven't provided many of the most basic details
    about what kind of request your user agent is making here; we
    don't even know what the request type is.

    > I know the name the script, which I must specify, however I do not know
    > the content of those scripts.


    This implies that this is a POST request specifying some "script"
    as the resource, possibly operating under CGI. In that case, the
    processing and any possible disposition of the request-body entity
    is entirely up to that script.

    --
    Michael Wojcik michael.wojcik@microfocus.com

    Pseudoscientific Nonsense Quote o' the Day:
    From the scientific standpoint, until these energies are directly
    sensed by the evolving perceptions of the individual, via the right
    brain, inner-conscious, intuitive faculties, scientists will never
    grasp the true workings of the universe's ubiquitous computer system.
    -- Noel Huntley

+ Reply to Thread