0

I am running a perl script on an Apache httpd server and intermittently I get 500 Internal Server Error.

When I check the error log , I see below error :

Mon Feb 22 15:04:25 2021] [error] [client xxx.xxx.xx.xx ] malformed header from script. Bad header=Can I override this?: test.cgi

Can someone please let me know what could have went wrong ?

1

1 Answer 1

1

This first text that a CGI program should print to STDOUT is the CGI headers (which will probably include Content-type:).

It seems that under some circumstances, your program prints the string "Can I override this?" before those headers. The web server tries to parse that string as a header, fails and throws an error.

Look at your code, find out why it is printing that string and either stop it from doing so or ensure that the correct headers are printed first.

Without seeing your code, it's hard to be much more help.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.