Response header name ' Content- type' contains invalid characters, after running a Perl_CGI script.

Hello ! Everyone, I am back here again to get your help.
Sorry, sorry for getting help alone and not helping other people's post.
But I will try to help others in another way, so please generous.
O.K. let me get started. I got weird error message as shown at the title, while I am reviewing the error_log at /var/log/httpd/ error_log. I never encountered this error message, so I can't figure the point of the error message. Does anyone has any clue to fix this error?

I will post the references.
==== httpd error_log about 10 lines ================
"error_log" 30085L, 10087905B
Entering Ex mode. Type "visual" to go to Normal mode.
[Fri May 19 08:09:31.243913 2023] [http:error] [pid 563189:tid 563250] [client 106.154.124.30:35684] AH02429: Response header name ' Content-
type' contains invalid characters, aborting request, referer: http://110.3.33.130/cgi-bin/cgi53_1_us01.pl?performer_name=alfred_brendel
[Fri May 19 08:10:08.223604 2023] [http:error] [pid 563189:tid 563253] [client 106.154.124.30:35696] AH02429: Response header name ' Content-
type' contains invalid characters, aborting request, referer: http://110.3.33.130/cgi-bin/cgi53_1_us01.pl?performer_name=alfred_brendel
[Fri May 19 08:11:59.726934 2023] [http:error] [pid 563189:tid 563236] [client 106.154.124.30:35710] AH02429: Response header name ' Content-
type' contains invalid characters, aborting request, referer: http://110.3.33.130/cgi-bin/cgi53_1_us01.pl?performer_name=alicia_de_larrocha
[Fri May 19 08:26:02.674690 2023] [http:error] [pid 563189:tid 563241] [client 106.154.124.30:35714] AH02429: Response header name ' Content-
type' contains invalid characters, aborting request, referer: http://110.3.33.130/cgi-bin/cgi53_1_us01.pl?performer_name=alicia_de_larrocha
[Fri May 19 08:26:10.607154 2023] [http:error] [pid 563189:tid 563243] [client 106.154.124.30:35716] AH02429: Response header name ' Content-
type' contains invalid characters, aborting request, referer: http://110.3.33.130/cgi-bin/cgi53_1_us01.pl?performer_name=alicia_de_larrocha

=== CODE ===================

# BEGINNING of cgi53_search_header_us01.pl

print "Content-type: text/html \n\n";
print "
<html>
<head><title>Search Reuslt of $query_performer_name.</title></head>
<body bgcolor=\"#ffffff\">
";

print "
<table>
<tr>
<td width=\"50\">&nbsp;</td>
<td width=\"600\"><font size=\"5\"><b> $query_performer_name </b></font> &nbsp;&nbsp;&nbsp; </td>
</tr>
</table>
<hr />
";
# Here is border line ===========================================================


5 Comments

Sometimes just explaining a problem you can't figure out enables you to figure it out. Strange, but true.

I would note that posting something like this on https://stackoverflow.com/ and tagging it with #perl will get you helpful feedback quite quickly.

Leave a comment

About Kido Mitsuru

user-pic To ask questions to this blog community