Re: No carriage returns?
"Stephen F. Booth" <[email protected]> Wed, 29 Jan 2014 08:40:55 -0500
| Newsgroups | gmane.comp.gcc.cgicc.bugs |
|---|---|
| Message-ID | <CAFMowGUXLK3LWd4qrdeV7b30tdANRGHq5xE04K4sewECPH5T2Q@mail.gmail.com> |
--===============5519787562749315458== Content-Type: multipart/alternative; boundary=001a11c2476411add204f11c17fb --001a11c2476411add204f11c17fb Content-Type: text/plain; charset=ISO-8859-1 Hi Walter, It's been forever since I've looked at the cgicc code but it does seem this non-compliant behavior goes back to at least 2001. RFC 2616 supersedes RFC 2068 but both require CRLF as the end of line separator. However, RFC 2068 has the following note in 19.3: The line terminator for message-header fields is the sequence CRLF. However, we recommend that applications, when parsing such headers, recognize a single LF as a line terminator and ignore the leading CR. which explains why this bug doesn't seem to affect most browsers. It should still be fixed, however. Stephen On Tue, Jan 28, 2014 at 5:16 PM, Walter Landry <[email protected]> wrote: > Hello, > > I was trying out cgicc, and I noticed that cgicc does not insert the > required carriage returns "\r". For example, in > > http://www.gnu.org/software/cgicc/doc/cgicc_tutorial.html > > the section "The HTTP Response" states > > A standard HTML 4.0 document need only output a single header: > > cout << cgicc::HTTPHTMLHeader() << endl; > > This will generate the output > > Content-Type: text/html\n\n > > I thought that RFC 2068 mandates > > Content-Type: text/html\r\n > > Am I missing something? > > Thanks, > Walter Landry > [email protected] > > _______________________________________________ > bug-cgicc mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/bug-cgicc > --001a11c2476411add204f11c17fb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Walter,<div><br></div><div>It's been forever since = I've looked at the cgicc code but it does seem this non-compliant behav= ior goes back to at least 2001. =A0RFC 2616 supersedes RFC 2068 but both re= quire CRLF as the end of line separator. =A0However, RFC 2068 has the follo= wing note in 19.3:</div> <div><br></div><div><pre style=3D"color:rgb(0,0,0);word-wrap:break-word;whi= te-space:pre-wrap"> The line terminator for message-header fields is the = sequence CRLF. However, we recommend that applications, when parsing such headers, recognize a single LF as a line terminator and ignore the leading CR. </pre></div><div><br></div><div>which explains why this bug doesn't see= m to affect most browsers. =A0It should still be fixed, however.</div><div>= <br></div><div>Stephen</div></div><div class=3D"gmail_extra"><br><br><div c= lass=3D"gmail_quote"> On Tue, Jan 28, 2014 at 5:16 PM, Walter Landry <span dir=3D"ltr"><<a hre= f=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&= gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 = 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hello,<br> <br> I was trying out cgicc, and I noticed that cgicc does not insert the<br> required carriage returns "\r". =A0For example, in<br> <br> =A0 <a href=3D"http://www.gnu.org/software/cgicc/doc/cgicc_tutorial.html" t= arget=3D"_blank">http://www.gnu.org/software/cgicc/doc/cgicc_tutorial.html<= /a><br> <br> the section "The HTTP Response" states<br> <br> =A0 A standard HTML 4.0 document need only output a single header:<br> <br> =A0 =A0 cout << cgicc::HTTPHTMLHeader() << endl;<br> <br> =A0 This will generate the output<br> <br> =A0 =A0 Content-Type: text/html\n\n<br> <br> I thought that RFC 2068 mandates<br> <br> =A0 =A0 Content-Type: text/html\r\n<br> <br> Am I missing something?<br> <br> Thanks,<br> Walter Landry<br> <a href=3D"mailto:[email protected]">[email protected]</a><br> <br> _______________________________________________<br> bug-cgicc mailing list<br> <a href=3D"mailto:[email protected]">[email protected]</a><br> <a href=3D"https://lists.gnu.org/mailman/listinfo/bug-cgicc" target=3D"_bla= nk">https://lists.gnu.org/mailman/listinfo/bug-cgicc</a><br> </blockquote></div><br></div> --001a11c2476411add204f11c17fb-- --===============5519787562749315458== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ bug-cgicc mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-cgicc --===============5519787562749315458==--