in reply to Style Sheet Doesn't Display Styles

Joost,

Regarding your reply and suggestions here...

...I installed livehttpheaders in firefox and checked the headers for both my test perl script and my HTM file using the exact same source code as the perl script:

Perl Header (for the script that doesn't correctly diplay styles)

http://127.0.0.1:81/perl/secure/test.pl GET /perl/secure/test.pl HTTP/1.1 Host: 127.0.0.1:81 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4 +) Gecko/20060508 Firefox/1.5.0.4 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9 +,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cache-Control: max-age=0 HTTP/1.x 200 OK Connection: close Content-Type: text/html ---------------------------------------------------------- http://127.0.0.1:81/perl/secure/training_site.css GET /perl/secure/training_site.css HTTP/1.1 Host: 127.0.0.1:81 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4 +) Gecko/20060508 Firefox/1.5.0.4 Accept: text/css,*/*;q=0.1 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://127.0.0.1:81/perl/secure/test.pl Cache-Control: max-age=0 HTTP/1.x 200 OK ----------------------------------------------------------

HTM Header (For the HTM that correctly displays styles)

http://127.0.0.1:81/perl/secure/test.htm GET /perl/secure/test.htm HTTP/1.1 Host: 127.0.0.1:81 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4 +) Gecko/20060508 Firefox/1.5.0.4 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9 +,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive HTTP/1.x 200 OK Transfer-Encoding: chunked Server: OptiPerl/Commercial Content-Type: text/html Connection: close --------------: --- ---------------------------------------------------------- http://127.0.0.1:81/perl/secure/training_site.css GET /perl/secure/training_site.css HTTP/1.1 Host: 127.0.0.1:81 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4 +) Gecko/20060508 Firefox/1.5.0.4 Accept: text/css,*/*;q=0.1 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://127.0.0.1:81/perl/secure/test.htm HTTP/1.x 200 OK Server: OptiPerl/Commercial Content-Type: text/css Connection: close Content-Length: 1950 ----------------------------------------------------------

I've tried both IE and Firefox with indentical results.

I compared the two headers using "Beyond Compare 2" and found that this portion exists in the header for the HTM file that displays correctly, but are missing from the actual perl script file's header:

Server: OptiPerl/Commercial Content-Type: text/css Connection: close Content-Length: 1950
I guess with these items missing the css file doesn't get called correctly. The question is how do I fix this? Is this a server configuration thing? Thanks for all the help, everyone. I'm seeking further enlightenment.

Replies are listed 'Best First'.
Re^2: Style Sheet Doesn't Display Styles
by shmem (Chancellor) on Jul 20, 2006 at 07:19 UTC
    Yes, I guess, it's an SSP (server side problem) which looks like a bug to me, but it can also be intended behaviour and configurable. I don't know the OptiPerl/Commercial server, you should contact the vendor if you don't find the solution in the server's docs.

    The different behaviour with long/short $body variable content seems to be a red herring though - your script runs fine on my apache. Length doesn't matter ;-)

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

      Hi shmem, thanks for responding. I think I'm leaning more and more to the view that this is definately a server problem/bug.

      For some unknown reason (don't you love it?), the problem unexpectedly went away just as unexpectedly as it manifested itself.

      Perhaps it cleared up when I restarted the local server that comes with OptiPerl. If it was something that simple... *smacks forhead*

      Perhaps it was something different. I'm still not sure.

      I'm going to restart my computer and see if the problem is still there or if it has gone away--hopefully for good.

        Unknown reasons make me nervous. Always. I'd dig into the code of the server just to see under which conditions it doesn't add the appropriate headers (if that was the problem) or otherwise reproduce the odd behaviour. If there is time, that is.

        cheers, shmem