[Zope] RE: Wrong <base href=""> for .HTM file

Loren Stafford lstafford@morphics.com
Wed, 25 Apr 2001 19:14:03 -0700


I forgot to mention, in case it's relevant, that I'm using Zope 2.2.4 with
LocalFS, and /Engineering/LSFReports/ is a LocalFS folder.

-- Loren

> -----Original Message-----
> From: Loren Stafford [mailto:lstafford@morphics.com]
> Sent: Wednesday, April 25, 2001 19:06
> To: zope@zope.org
> Subject: Wrong <base href=""> for .HTM file
>
>
> Look at this pywatch output below. When I request a file that
> ends in .HTM the <base> tag ends with a / which confuses the
> browser. The browser makes all relative references in the .HTM
> file (<img> tags for example) relative to
> http://localhost/Engineering/LSFReports/cibhrm6.HTM/ not to
> http://localhost/Engineering/LSFReports/ as you would expect.
>
> When I try this with a file that is named with a lowercase .htm
> extension, no <base> is generated, and the browser fetches all
> relative <img> tags just fine.
>
> I tried to figure out what HTTPResponse.py is doing with <base>
> but didn't get far. Does anyone else understand what's happening?
>
> -- Thanks
> -- Loren
>
>
> ==> GET /Engineering/LSFReports/cibhrm6.HTM HTTP/1.1
> ==> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
> application/vnd.ms-powerpoint, application/vnd.ms-excel,
> application/msword, application/pdf, */*
> ==> Accept-Language: en-us,ko;q=0.5
> ==> Accept-Encoding: gzip, deflate
> ==> User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
> ==> Host: localhost
> ==> Connection: Keep-Alive
> ==>  [0.030 - Server connected]
> <== HTTP/1.1 200 OK
> <== Server: Zope/Zope 2.2.4 (binary release, python 1.5.2,
> win32-x86) ZServer/1.1b1
> <== Date: Thu, 26 Apr 2001 01:40:34 GMT
> <== Content-Type: text/html
> <== Content-Length: 13850
> <== Last-Modified: Wed, 25 Apr 2001 23:41:43 GMT
> <==
> <== <HTML>
> <== <HEAD>
> <== <base href="http://localhost/Engineering/LSFReports/cibhrm6.HTM/" />
> <==
> <== </HEAD>
> <== <BODY BGCOLOR="FFFFFF">