Good morning all,

After a night of reflection, I realized what the problem might be. I have this issue solved, now, but I don't understand my solution.

The basic problem was this: if I used a form-submit button to access a CGI page that used a 'text/plain' HTTP header, the browser wanted to download rather than display. Several monks, having patience with my poor explanations, indicated that it worked fine on their systems.

And, indeed, when I changed the code that called this text-returning CGI script from a form to a link, the browser happily rendered the page.

Apparently, there is something "different" about how a form behaves from a link. So, I checked if this was a GET vs. POST difference, and indeed it is. That surprised me: in my mind GET & POST were basically interchangeable, but POST made a "prettier" URL.

I google'd a bit, and only ran across basic explanations of the GET/POST, nothing that seemed to explain this kind of difference. Can anyone offer any suggestions on where to look to find more information, or on what's going on?


In reply to CGI header behaves differently for forms vs. links by Anonymous Monk
in thread CGI header doesn't like me by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.