Re: [Zope] Netscape Image Problems (LoginManager?)

2000-05-24 Thread Itamar Shtull-Trauring

[EMAIL PROTECTED] wrote:

 Using the %{If-Modified-Since}i directive in the Apache log, we have been
 able to confirm that Netscape 3.01 and 4.06 on Win32 are sending
 If-Modified-Since with "16-May-00" type dates. Dieter's solution indeed
 fixes the problem by removing the Overflow error that they cause when the
 int() function is called on them.
 
 I noticed that Zope 2.1.4 does not have these int() calls in the offending
 section of lib/python/OFS/Image.py but they are present in 2.1.6. Why were
 they introduced on the latter version? Can they be removed in future
 versions?

No, they can't - HTTP datetime headers specify time in whole seconds, while
the time() function on Unix machines returns time with a floating point
time.  In order for Zope to work correctly the you have to make timeTime()'s
result be a whole number.  long() would be fine though, or floor().

-- 
Itamar S.T.  [EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Netscape Image Problems (LoginManager?)

2000-05-23 Thread andres

On Mon, May 22, 2000 at 03:10:59PM -0500, Jon Delheimer wrote:
 
 Shane,
 
 I made the changes you suggested to Image.py.
 
 Here are the results:
 
 Thursday, 11-May-00 16:21:32 GMT
 1900/05/11 16:21:31 GMT
 -2197697908.0

I have stepped through the debugger with the call of
ZPublisher.Zope('/path/to/image', d=1). Upon immediate entry into the
ZPublisher/Test.py module I can set environ['IF_MODIFIED_SINCE'] to
something reasonable such as 'Wednesday, March 15, 2000 19:02:17 GMT' and I
get no error as I step through the code. This exonerates the Zope python code.

The question then remains who is producing the buggy If-Modified-Since that
puts the date back to 1900. Does someone know how to trap the headers that
are sent to Zope so they can be inspected?

--
Andres Corrada-Emmanuel   Email: [EMAIL PROTECTED]
--

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] Netscape Image Problems (LoginManager?)

2000-05-23 Thread Dieter Maurer

Jon Delheimer writes:
  charset="iso-8859-1"
  
  
  Shane,
  
  I made the changes you suggested to Image.py.
  
  Here are the results:
  
  ...
  Thursday, 11-May-00 15:53:50 GMT
  1900/05/11 15:53:50 GMT
  -2197699570.0

That explains the exception:
  1900 is a bit too far in the past.
  Seems that Netscape sends such a strange "If-Modified-Since" header.

  You can try to fix this problem, by removing the "int(...)"
  in "OFS.Image.py:186"

mod_since=int(DateTime(header).timeTime())

     

mod_since=DateTime(header).timeTime()

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] Netscape Image Problems (LoginManager?)

2000-05-23 Thread john

You Rock Dieter,

Thanks to everyone for their input!

This has solved the nasty Netscape Image problem for now!

j

[EMAIL PROTECTED]


At 09:05 PM 5/23/00 +0200, you wrote:
Jon Delheimer writes:
  charset="iso-8859-1"
  
  
  Shane,
  
  I made the changes you suggested to Image.py.
  
  Here are the results:
  
  ...
  Thursday, 11-May-00 15:53:50 GMT
  1900/05/11 15:53:50 GMT
  -2197699570.0

That explains the exception:
  1900 is a bit too far in the past.
  Seems that Netscape sends such a strange "If-Modified-Since" header.

  You can try to fix this problem, by removing the "int(...)"
  in "OFS.Image.py:186"

mod_since=int(DateTime(header).timeTime())

     

mod_since=DateTime(header).timeTime()

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] Netscape Image Problems (LoginManager?)

2000-05-22 Thread john

Well I have determined that it has nothing to do with PTK or Login Manager,
well I think
anyway...

If you hit reload it breaks the images on the root level, if you put your
cursor in the Location,
or URL field and hit enter it reloads fine.

I truly don't understand this problem and it only does it with images, in
Netscape, is this an issue
that everyone is just accepting or is there a fix for it.

j


At 08:51 AM 5/22/00 -0500, you wrote:

I'm not using PTK, but I am using LoginManager. I wonder if it or ZPatterns
are causing this phenomena.

I use absolute URLs for images, so that's not an issue.

Could LoginManager be denying access to the images on a refresh?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 [EMAIL PROTECTED]
 Sent: Monday, May 22, 2000 1:04 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Zope] Netscape Image Problems


 I just noticed something strange..it is only doing it when
 you are inside
 a Portal (ptk)...very strange..

 j


 At 12:45 AM 5/22/00 -0500, you wrote:
 
 I'm experiencing the same thing with Navigator 4.08 on NT4 against Zope
 2.1.6 from Debian "potato". Disabling Navigator's cache fixes
 the problem.
 That's not a satisfactory solution, though.
 
 
 On Sun, 21 May 2000 [EMAIL PROTECTED] wrote:
 
  I have tried to track down a solution to this problem for a
 couple of days.
 
  I have Zope 2.1.6 (binary release, python 1.5.2, win32-x86) installed.
 
  Everything is working great, but when I use Netscape 3, 4.X ,
 every time
  I hit the reload button or come back to the page at a later
 date all of my
  images won't display. It just shows the classic broken image
 icon that is
  default for Netscape.
 
  I know that it isn't a Zope issue because the zope.org site works fine!
 
  This is obviously not acceptable to any viewer, could someone
 please give
  me a work around or a solution to this problem.
 
  Thank you in advance!
 
  j
 
  [EMAIL PROTECTED]
 
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
 
 
 


 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Netscape Image Problems (LoginManager?)

2000-05-22 Thread Chris Withers

[EMAIL PROTECTED] wrote:
 
 Well I have determined that it has nothing to do with PTK or Login Manager,
 well I think
 anyway...

I would agree as I've experienced this exact same problem with Netscape
3.04 and my Squishdot site at http://www.bay-c.co.uk

cheers,

Chris

PS: I'd love to know what's causing this...

PPS: Is anyone who's experiencing this using SiteAccess?

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Netscape Image Problems (LoginManager?)

2000-05-22 Thread Chris Withers

Jon Delheimer wrote:
 
 Checking the Z2.log file shows that Zope is returning a 500 status code
 (Internal Server Error) when the broken images appear.

That's not good :(

That means something is causing the requests to go astray.

Can you see what the requested object is compared with the URL you would
expect?

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Netscape Image Problems (LoginManager?)

2000-05-22 Thread Shane Hathaway

John,

Add the following lines just before line 186 of image.py and tell us
what comes out on the console (not your browser, but the
console--assuming the console is visible).

  print header
  print DateTime(header)
  print DateTime(header).timeTime()

Shane

[EMAIL PROTECTED] wrote:
 
 O.K
 
 If you just load the document in a Netscape Browseryou get the
 imagethen
 when you hit reload you get a Zope error message that says:
 
 Zope Error
 
Zope has encountered an error while publishing this resource.
 
Error Type: OverflowError
Error Value: float too large to convert
 
 traceback:
 
 error on line 186 of image.py
 
 186:   mod_since=int(DateTime(header).timeTime())
 
 I have tried loading a fresh copy of Zope and I still get the same error!
 
 pressing on to try to find answers!!
 
 j
 
 [EMAIL PROTECTED] wrote:
 
  Well I have determined that it has nothing to do with PTK or Login Manager,
  well I think
  anyway...
 
 I would agree as I've experienced this exact same problem with Netscape
 3.04 and my Squishdot site at http://www.bay-c.co.uk
 
 cheers,
 
 Chris
 
 PS: I'd love to know what's causing this...
 
 PPS: Is anyone who's experiencing this using SiteAccess?
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Netscape Image Problems (LoginManager?)

2000-05-22 Thread john

Shane,

Nope the console is not visible, couldn't even log in.

j


At 02:23 PM 5/22/00 -0400, you wrote:
John,

Add the following lines just before line 186 of image.py and tell us
what comes out on the console (not your browser, but the
console--assuming the console is visible).

  print header
  print DateTime(header)
  print DateTime(header).timeTime()

Shane

[EMAIL PROTECTED] wrote:
 
 O.K
 
 If you just load the document in a Netscape Browseryou get the
 imagethen
 when you hit reload you get a Zope error message that says:
 
 Zope Error
 
Zope has encountered an error while publishing this resource.
 
Error Type: OverflowError
Error Value: float too large to convert
 
 traceback:
 
 error on line 186 of image.py
 
 186:   mod_since=int(DateTime(header).timeTime())
 
 I have tried loading a fresh copy of Zope and I still get the same error!
 
 pressing on to try to find answers!!
 
 j
 
 [EMAIL PROTECTED] wrote:
 
  Well I have determined that it has nothing to do with PTK or Login 
Manager,
  well I think
  anyway...
 
 I would agree as I've experienced this exact same problem with Netscape
 3.04 and my Squishdot site at http://www.bay-c.co.uk
 
 cheers,
 
 Chris
 
 PS: I'd love to know what's causing this...
 
 PPS: Is anyone who's experiencing this using SiteAccess?
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] Netscape Image Problems (LoginManager?)

2000-05-22 Thread Jon Delheimer


Shane,

I made the changes you suggested to Image.py.

Here are the results:

Thursday, 11-May-00 16:21:32 GMT
1900/05/11 16:21:31 GMT
-2197697908.0
Sunday, 14-May-00 04:03:14 GMT
1900/05/14 04:03:14 GMT
-2197483006.0
Thursday, 11-May-00 15:53:50 GMT
1900/05/11 15:53:50 GMT
-2197699570.0
Thursday, 11-May-00 15:53:50 GMT
1900/05/11 15:53:50 GMT
-2197699570.0
Thursday, 11-May-00 15:53:50 GMT
1900/05/11 15:53:50 GMT
-2197699570.0
Thursday, 11-May-00 15:53:50 GMT
1900/05/11 15:53:50 GMT
-2197699570.0
Thursday, 11-May-00 15:53:50 GMT
1900/05/11 15:53:50 GMT
-2197699570.0
Thursday, 11-May-00 15:53:50 GMT
1900/05/11 15:53:50 GMT
-2197699570.0

Jon

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Shane Hathaway
 Sent: Monday, May 22, 2000 1:24 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Zope] Netscape Image Problems (LoginManager?)


 John,

 Add the following lines just before line 186 of image.py and tell us
 what comes out on the console (not your browser, but the
 console--assuming the console is visible).

   print header
   print DateTime(header)
   print DateTime(header).timeTime()

 Shane

 [EMAIL PROTECTED] wrote:
 
  O.K
 
  If you just load the document in a Netscape Browseryou get the
  imagethen
  when you hit reload you get a Zope error message that says:
 
  Zope Error
 
 Zope has encountered an error while publishing this resource.
 
 Error Type: OverflowError
 Error Value: float too large to convert
 
  traceback:
 
  error on line 186 of image.py
 
  186:   mod_since=int(DateTime(header).timeTime())
 
  I have tried loading a fresh copy of Zope and I still get the
 same error!
 
  pressing on to try to find answers!!
 
  j
 
  [EMAIL PROTECTED] wrote:
  
   Well I have determined that it has nothing to do with PTK or
 Login Manager,
   well I think
   anyway...
  
  I would agree as I've experienced this exact same problem with Netscape
  3.04 and my Squishdot site at http://www.bay-c.co.uk
  
  cheers,
  
  Chris
  
  PS: I'd love to know what's causing this...
  
  PPS: Is anyone who's experiencing this using SiteAccess?
  
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
  
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )