You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Wouter van Vliet <wo...@springt.nl> on 2003/11/27 14:29:23 UTC

[users@httpd] Messing with Headers

Hi Folks,
 
I'm running this website, an online webshop in Dutch comic books
(www.comicstripshop.com), perl 5.6.2 /mod_perl 1.26 / apache 1.3.27 and got
some problems with headers on various browsers/platforms. It all started
with a customer reporting one particular frame (yes, frames .. next step is
unframing ;)) to give some error code of 566. Posted that before. Turned out
he was a Compuserve (dutch branch of AOL) user, and probably the error came
from that. Eventually I discovered there was some problem with the headers,
which I had forgotten (stupid me) to print explicitly on that (and some
other) page. Now that I have done that, it seems to work on most browsers we
can test with. Though, Netscape 4.5 still complains about a missing *ughmm*
plugin for "application/x-perl".

Here's all the headers sent by that particular page:

[comics@stan comics]$ lynx -mime_header
"http://www.isbh.nl/mainpage/search/header_left.pl?zoekpad=1&mode1=titel"
HTTP/1.1 200 OK
Date: Thu, 27 Nov 2003 13:44:01 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6b
PHP/4.1.2 mod_perl/1.26
Expires: Thu, 27 Nov 2003 13:54:01 GMT
Connection: close
Content-Type: text/html; charset=ISO-8859-1
 
Of course, I want to be as compatible as can be. So this old Netscape
browser should read the page properly too. Can somebody advice me on
additional headers to set from my perl scripts, or maybe automatically by
Apache?

Thanks,
Wouter




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Messing with Headers

Posted by Robert Andersson <ro...@profundis.nu>.
Wouter van Vliet wrote:
> BAO RuiXian wrote:
> > Maybe you can use JavaScript to set up proper headers
> > according to different browsers.
>
> Hmm, JavaScript to send headers. Not sure what to think of that.

I suggest not think about that at all.

This seems really strange. Nowhere in the headers are anything mentioned
about application/x-perl, except very remotely mod_perl. So, where does the
obscure Netscape version get anything about Perl? Could some sort of header
magic happen that we don't see?

I think you need make a request with the particular browser, and intercept
the request and response headers. From this you could determine if there is
something in the response that could be interpreted like that by the
browser, and the request headers could give hints to why those headers are
generated; content negotiation etc.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Messing with Headers

Posted by Wouter van Vliet <wo...@springt.nl>.
BAO RuiXian wrote:
> Wouter van Vliet wrote:
> 
>> Hi Folks,
>> 
>> 
> [snip]
> 
>> .nl/mainpage/search/header_left.pl?zoekpad=1&mode1=titel"
>> HTTP/1.1 200 OK
>> Date: Thu, 27 Nov 2003 13:44:01 GMT
>> Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.12
>> OpenSSL/0.9.6b PHP/4.1.2 mod_perl/1.26
>> Expires: Thu, 27 Nov 2003 13:54:01 GMT
>> Connection: close
>> Content-Type: text/html; charset=ISO-8859-1
>> 
>> Of course, I want to be as compatible as can be. So this old Netscape
>> browser should read the page properly too. Can somebody advice me on
>> additional headers to set from my perl scripts, or maybe
>> automatically by Apache? 
>> 
>> 
> Maybe you can use JavaScript to set up proper headers
> according to different browsers.
> 
> Best
> 
> Bao
> 

Hmm, JavaScript to send headers. Not sure what to think of that. My question
is not really how to set headers, I can do that. Also browser-dependant if I
want to from my Perl/CGI script. More like what Headers I need to set set so
that they are understood by most (if not all) browsers. 

Thanks, Wouter





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Messing with Headers

Posted by BAO RuiXian <ru...@pp.inet.fi>.

Wouter van Vliet wrote:

>Hi Folks,
>  
>
[snip]

>.nl/mainpage/search/header_left.pl?zoekpad=1&mode1=titel"
>HTTP/1.1 200 OK
>Date: Thu, 27 Nov 2003 13:44:01 GMT
>Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6b
>PHP/4.1.2 mod_perl/1.26
>Expires: Thu, 27 Nov 2003 13:54:01 GMT
>Connection: close
>Content-Type: text/html; charset=ISO-8859-1
> 
>Of course, I want to be as compatible as can be. So this old Netscape
>browser should read the page properly too. Can somebody advice me on
>additional headers to set from my perl scripts, or maybe automatically by
>Apache?
>  
>
Maybe you can use JavaScript to set up proper headers according to 
different browsers.

Best

Bao



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Messing with Headers

Posted by Wouter van Vliet <wo...@springt.nl>.
Jonas Eckerman wrote:
> On Thu, 27 Nov 2003 14:29:23 +0100, Wouter van Vliet wrote:
> 
>> Here's all the headers sent by that particular page: [...]
> 
> Those headers looks perfectly fine. I can't see any reason
> for a browser receiveing those headers to start asking for plugins.
> 
> The Content-Type is text/html, so the browser should simply display
> it as text/html. 
> 
> Could the broken old Netscape browser be checking the file name
> (header_left.pl) rather than the headers?
> 
> Could there be any http meta-tags in the actual page that the browser
> chokes on? 
> 
> /Jonas

In fact, it turned out to be a matter of miscommunication. My uncle (who had
the old Netscape installad) was getting that application/x-perl notice on
another (temporary) page I had set up to check what would happen. Then when
he told me about the application/x-perl problem, I thought he saw that on
the 'real' page.. Thanks a lot for all your help.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Messing with Headers

Posted by Jonas Eckerman <jo...@frukt.org>.
On Thu, 27 Nov 2003 14:29:23 +0100, Wouter van Vliet wrote:

> Here's all the headers sent by that particular page:
[...]

Those headers looks perfectly fine. I can't see any reason for a 
browser receiveing those headers to start asking for plugins.

The Content-Type is text/html, so the browser should simply display 
it as text/html.

Could the broken old Netscape browser be checking the file name 
(header_left.pl) rather than the headers?

Could there be any http meta-tags in the actual page that the browser 
chokes on?

/Jonas

-- 
Jonas Eckerman, jonas_lists@frukt.org
http://www.fsdb.org/



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org