-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
From the context, I understood the question to be about a CGI
response, rather than a raw HTTP transaction response.
They're very similar, of course, by design; but there are subtle
differences, so I'd have to recommend keeping the concepts distinct on
one's mind.
Of course, this has nothing specifically to do with Perl.
But as perlport points out, the correct portable terminator for
interworking sockets (and this goes for HTTP) would be \015\012 (i.e
CRLF) written in binary mode.
For CGI, however, where the process is communicating with the web
server (httpd) on the _same_ platform, the platform-specific newline
representation, i.e \n , is considered appropriate. And that's what
we saw being used in this presumed-CGI context, so that detail was OK
(the problem lay elsewhere, as I said before).
So that at least manages to drag _some_ Perl relevance into the
thread, even if this particular issue doesn't answer the questioner's
problem ;-)
CRLF vs LF is not the OP's problem.
The OP wrote:
# For some reason in this sendmail routine, if I position
# this line after a particular line in the sendmail rountine, print
# "Content-type: text/html\n\n"; it causes the redirect to print out as
# html on the screen only...
where "this line" means the "Location:
http://..." line.
A CGI program's output consists of HTTP headers followed by content. The
headers are separated from the content by a pair of newlines (a pair of
CRLF pairs, strictly speaking). The OP clearly output a Content-type
HTTP header, followed by a pair of newlines which ends the header set.
No wonder the "Location" header was displayed on the browser screen as
content instead of being used by the server or browser for redirection.
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBPzaa42PeouIeTNHoEQKxkACgrEbcGns974PdOY47kvUF0OCkXVsAoKqz
RhIGVMiZuXAa8IEsJGczGdvv
=Q4GU
-----END PGP SIGNATURE-----