Why sometime response header not return text/html in perl script
Why sometime when request http and response header not retu开发者_运维百科rn text/html in perl script?
- Page is randomly blank on load (white screen)
- Response headers HTTP/0.9 200 OK (white screen), but when page loads correctly – HTTP/1.1 200 OK
- No error log apache.
- When page load blank, I View page Source all tag html exist.
Try adding:
use CGI::Carp qw[fatalsToBrowser];
to your program to see if you get any error messages.
Remember to comment it out again before putting the program into production.
We can't tell without seeing the source code. My first guess is that instead of printing
Content-Type: text/html
<html>
... rest of your page
you don't have the blank line after the Content-Type header.
Again, it's hard to tell without seeing your code, or seeing the exact response from the server.
精彩评论