[Zope] Dumb object aliasing question
Darrell
dgallion@rochester.rr.com
Tue, 28 Dec 1999 13:07:32 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_20AF_01BF5134.8078E8A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Manage also works with this patch.
Just had to change the setting in IE that has it check each time for a =
new image.
--Darrell
----- Original Message -----=20
From: Darrell=20
To: Darrell ; Zope@zope.org=20
Sent: Tuesday, December 28, 1999 10:52 AM
Subject: Re: [Zope] Dumb object aliasing question
Sorry for the code on this list. Wasn't sure about moving it to =
ZopeDev.
This fixes the problem for the outside caller. The images change in =
sync with what ever you upload.
I changed > to <
self._p_mtime is the date of the object in zope and ms is the changed =
since date from the browser.
=20
OFS/image.py line: 187
# Attempt to handle If-Modified-Since headers.
ms=3DREQUEST.get_header('If-Modified-Since', None)
if ms is not None:
ms=3Dstring.split(ms, ';')[0]
ms=3DDateTime(ms).timeTime()
if self._p_mtime < ms:
RESPONSE.setStatus(304)
return RESPONSE
=20
If 304 is set, it means the data hasn't changed.
304: ('Not modified',
'Document has not changed singe given time'),
=20
This doesn't fix it for manage though.
I'll look at that one tonight.
=20
=20
--Darrell
----- Original Message -----=20
From: Darrell=20
To: Zope@zope.org=20
Sent: Monday, December 27, 1999 10:27 PM
Subject: [Zope] Dumb object aliasing question
If I add a new image, call it img1 and view it outside of manage, =
all is well. If I replace that image and view it. It hasn't changed ?? =
If I view it in manage it's the new image.=20
Restarting Zope doesn't help.
If I now change this image in manage a second time it won't change. =
But it's size changed, just not the image.
I picked up the CVS version deleted Data.fs and started over, with =
the same results. Shouldn't I be able to change an image ?
Any idea where the code is that decides to render one way for local =
manage and another way for the remote user ? I'll find it eventually =
....gurrr
--Darrell
------=_NextPart_000_20AF_01BF5134.8078E8A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DCourier size=3D2>Manage also works with this =
patch.</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>Just had to change the setting in IE =
that has it=20
check each time for a new image.</FONT></DIV>
<DIV> </DIV>
<DIV>--Darrell</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A href=3D"mailto:dgallion@rochester.rr.com"=20
title=3Ddgallion@rochester.rr.com>Darrell</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
href=3D"mailto:darrell@dorb.com"=20
title=3Ddarrell@dorb.com>Darrell</A> ; <A =
href=3D"mailto:Zope@zope.org"=20
title=3DZope@zope.org>Zope@zope.org</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, December 28, =
1999 10:52=20
AM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: [Zope] Dumb object =
aliasing=20
question</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DCourier size=3D2>Sorry for the code on this list. =
Wasn't sure=20
about moving it to ZopeDev.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>This fixes the problem for the =
outside caller.=20
The images change in sync with what ever you upload.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>I changed > to <</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>self._p_mtime is the date of the =
object in zope=20
and ms is the changed since date from the browser.</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
<DIV><FONT face=3DCourier size=3D2>OFS/image.py line: 187</FONT></DIV>
<DIV><FONT face=3DCourier =
size=3D2> # Attempt=20
to handle If-Modified-Since=20
headers.<BR> =20
ms=3DREQUEST.get_header('If-Modified-Since',=20
None)<BR> if ms is not=20
=
None:<BR> &nbs=
p;=20
ms=3Dstring.split(ms,=20
=
';')[0]<BR> &n=
bsp;=20
=
ms=3DDateTime(ms).timeTime()<BR>  =
; =20
if self._p_mtime <=20
=
ms:<BR> =
=20
=
RESPONSE.setStatus(304)<BR> &nbs=
p; =20
return RESPONSE<BR></FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
<DIV><FONT face=3DCourier size=3D2>If 304 is set, it means the data =
hasn't=20
changed.</FONT></DIV>
<DIV><FONT face=3DCourier =
size=3D2> 304:=20
('Not=20
=
modified',<BR>  =
; =20
'Document has not changed singe given time'),<BR></FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
<DIV><FONT face=3DCourier size=3D2>This doesn't fix it for manage=20
though.</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>I'll look at that one =
tonight.</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2> </DIV></FONT>
<DIV><FONT face=3DCourier size=3D2> </DIV></FONT>
<DIV>--Darrell</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; =
MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A href=3D"mailto:darrell@dorb.com" =
title=3Ddarrell@dorb.com>Darrell</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
href=3D"mailto:Zope@zope.org"=20
title=3DZope@zope.org>Zope@zope.org</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, December 27, =
1999 10:27=20
PM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Zope] Dumb object =
aliasing=20
question</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DCourier size=3D2>If I add a new image, call it =
img1 and view=20
it outside of manage, all is well. If I replace that image and =
view it.=20
It hasn't changed ?? If I view it in manage it's the new image. =
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>Restarting Zope doesn't =
help.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>If I now change this image in =
manage a second=20
time it won't change. But it's size changed, just not the=20
image.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>I picked up the CVS version =
deleted Data.fs=20
and started over, with the same results. </FONT><FONT face=3DCourier =
size=3D2>Shouldn't I be able to change an image ?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>Any idea where the code is that =
decides to=20
render one way for local manage and another way for the remote =
user ?=20
I'll find it eventually ....gurrr</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier=20
size=3D2>--Darrell</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_20AF_01BF5134.8078E8A0--