ajaksu added the comment:

he specific issue mentioned might arise from UAs interpreting the
snippet as a header, but the whole thing is so oblivious to standards
that it doesn't matter: 

 def reset():
    """Return a string that resets the CGI and browser to a known state."""
    return '''<!--: spam
Content-Type: text/html

<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font>'''


In a search over the stdlib, there are many hits for, e.g., "print
'Content-Type:','X'", but most (if not all) of these are printing to
stdout and also sending the headers correctly terminated over the network.

Other instances are due to local handling of files (like in
urllib2.FTPHandler.ftp_open), and in these we could change the explicit
"\n" to "\r\n", but there would be no gain IMHO.

I suggest closing this bug (at least until concrete examples of sending
non-CRLF terminated headers are provided).

----------
nosy: +ajaksu2

_____________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1597000>
_____________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to