Re: [Zope] WorldPilot - Regular messages are attachments? (PatchFix)

2000-06-14 Thread Bryan Stillwell

On Fri, 9 Jun 2000, ethan mindlace fremen wrote:

 Paul Gresham wrote:
  
  Excellent, thanks Bryan. I have another question? Do you have problems with
  browsers not obtaining the correct filenames of attachments when they are
  downloaded, i.e. the file becomes ATT0002.DAT or similar? I have this
  problem and also if I choose to download a file and then cancel the dialog,
  everything seems to get stuck, and I have to close the browser and start
  again.
 
 I have the same problem.  All attachments, when downloaded, become "getpart".  A
 simple rename works, but I find it highly obnoxious.

Ok, I fixed the problem with files trying to be saved as ATT0001.DAT, but
they're still messed up in Mozilla (which your using, right ethan?) where
they save as getpart (I think this is a Mozilla bug, and not a WorldPilot
bug). I also fixed the bug where if it's an image (jpeg, gif, etc.) it
gets displayed instead of downloaded.  I've attached the patch which fixes
both of these problems.

I also have new RPMs of WorldPilot that has all of my patches applied so
far here: http://www.verinet.com/~arcane/worldpilot/

Bryan

-- 
http://www.tummy.com/ Consulting and Software for Linux and Unix
KRUD - Kevin's Red Hat Uber Distribution - the Freshest Red Hat every month



--- WorldPilot.vanilla/Resource.py  Fri Mar 10 12:36:00 2000
+++ WorldPilot.mine/Resource.py Tue Jun 13 11:40:51 2000
@@ -4587,7 +4587,7 @@
 /FONT
 /B!--#endif--nbsp;/FONT/td
   td bgcolor="!--#var COLORTable--" NOWRAP!--#var 
FONTTable--nbsp;INPUT TYPE=CHECKBOX NAME="Messages:list" VALUE="!--#var 
UID--"/FONT/td
-  td bgcolor="!--#var COLORTable--" NOWRAP!--#var FONTTable--nbsp;A 
HREF="!--#if expr="'\\Draft' in 
Flags"--prog?DraftSource=Draft!--#else--prog?!--#endif--ViewMsg=1Message=!--#var
 UID--!--#if expr="REQUEST.has_key('Folder')"--Folder=!--#var 
Folder--!--#endif--!--#if expr="REQUEST.has_key('Index')"--Index=!--#var 
Index--!--#endif--!--#if expr="REQUEST.has_key('Order')"--Order=!--#var 
Order--!--#endif--!--#if expr="REQUEST.has_key('ListSize')"--ListSize=!--#var 
ListSize--!--#endif--!--#if 
expr="REQUEST.has_key('query_start')"--query_start=!--#var 
query_start--!--#endif--" DisTarget="Message!--#if 
expr="REQUEST.has_key('Folder')"--!--#var Folder--!--#endif--!--#var 
UID--"!--#var FONTTableLink--!--#if expr="Subject==''"!--#else--!--#var 
Subject size=25 etc="..." html_quote--!--#endif--/FONT/Anbsp;/FONT/td
+  td bgcolor="!--#var COLORTable--" NOWRAP!--#var FONTTable--nbsp;A 
+HREF="!--#if expr="'\\Draft' in 
+Flags"--prog?DraftSource=Draft!--#else--prog?!--#endif--ViewMsg=1Message=!--#var
+ UID--!--#if expr="REQUEST.has_key('Folder')"--Folder=!--#var 
+Folder--!--#endif--!--#if expr="REQUEST.has_key('Index')"--Index=!--#var 
+Index--!--#endif--!--#if expr="REQUEST.has_key('Order')"--Order=!--#var 
+Order--!--#endif--!--#if expr="REQUEST.has_key('ListSize')"--ListSize=!--#var 
+ListSize--!--#endif--!--#if 
+expr="REQUEST.has_key('query_start')"--query_start=!--#var 
+query_start--!--#endif--" DisTarget="Message!--#if 
+expr="REQUEST.has_key('Folder')"--!--#var Folder--!--#endif--!--#var 
+UID--"!--#var FONTTableLink--!--#if expr="Subject==''"!--#else--!--#var 
+Subject size=35 etc="..." html_quote--!--#endif--/FONT/Anbsp;/FONT/td
   !--#if expr="REQUEST.has_key('Folder') and Folder=='INBOX.Sent'"--
 td bgcolor="!--#var COLORTable--" NOWRAP!--#var 
FONTTable--nbsp;!--#if ToName--!--#var ToName--!--#else--!--#var 
ToAddress--!--#endif--nbsp;/FONT/td
   !--#else--
@@ -4786,7 +4786,7 @@
   !--#if BodyAttachment--
 tr
   td bgcolor="#FF" colspan=2table border=0 cellpadding=3 
cellspacing=0trtd!--#var FONTTable--FONT color="#404040"
-  A HREF="getpart?Message=!--#var Message--!--#if 
expr="REQUEST.has_key('Folder')"--Folder=!--#var Folder--!--#endif--!--#if 
BodyEncoding--MimeEncoding=!--#var BodyEncoding url_quote--!--#endif--!--#if 
BodyType--AttType=!--#var BodyType url_quote--!--#endif--!--#if 
BodySubType--AttSubType=!--#var BodySubType url_quote--!--#endif--!--#if 
BodyPart--Part=!--#var BodyPart--!--#endif--!--#if BodyDisposition--!--#with 
BodyDisposition--!--#if 
expr="PartDispositionAttrMap.has_key('FILENAME')"--FileName=/!--#var 
expr="PartDispositionAttrMap['FILENAME']"--!--#endif--!--#/with--!--#endif--"
+  A HREF="getpart?Message=!--#var Message--!--#if 
+expr="REQUEST.has_key('Folder')"--Folder=!--#var Folder--!--#endif--!--#if 
+BodyEncoding--MimeEncoding=!--#var BodyEncoding url_quote--!--#endif--!--#if 
+BodyType--AttType=!--#var BodyType url_quote--!--#endif--!--#if 
+BodySubtype--AttSubType=!--#var BodySubtype url_quote--!--#endif--!--#if 
+BodyPart--Part=!--#var BodyPart--!--#endif--!--#if BodyDisposition--!--#with 
+BodyDisposition--!--#if 
+expr="PartDispositionAttrMap.has_key('filename')"--FileName=/!--#var 
+expr="PartDispositionAttrMap['filename']"--!--#endif--!--#/with--!--#endif--"
 #  

Re: [Zope] WorldPilot - Regular messages are attachments? (PatchFix)

2000-06-14 Thread ethan mindlace fremen

Bryan Stillwell wrote:
 
 Ok, I fixed the problem with files trying to be saved as ATT0001.DAT, but
 they're still messed up in Mozilla (which your using, right ethan?) where
 they save as getpart (I think this is a Mozilla bug, and not a WorldPilot
 bug). I also fixed the bug where if it's an image (jpeg, gif, etc.) it
 gets displayed instead of downloaded.  I've attached the patch which fixes
 both of these problems.

Ah, mozilla.  I can deal with getpart.
 
 I also have new RPMs of WorldPilot that has all of my patches applied so
 far here: http://www.verinet.com/~arcane/worldpilot/

Wow, thanks for the patches  then packaging them, brian!

~ethan

___
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] WorldPilot - Regular messages are attachments?

2000-06-08 Thread Paul Gresham

Be careful here ... I think you'll also find that should you try to download
the attachement, It'll kill Zope. If you're running Zope with -D it'll
restart, otherwise you'll find you have no web site after trying to
download. I'm not sure what it does to kill Zope as there is no error, just
death. It seems to be a bit intermittent as well, which doesn't help.

I'm trying to fix the problem and will post the patch once it's ready,
hopefully next week when I get back from China. (I'm nothing to do with the
WorldPilot chaps, I just want to use the s/ware)

Gresh


  From: Dieter Maurer  [EMAIL PROTECTED]
  Date: Wed Jun 7, 2000 9:03pm
  Subject: Re: [Zope] WorldPilot - Regular messages are
attachments?


  Bryan Stillwell writes:

   Here's the traceback I received:
  
 Sorry, a Zope error occurred.p
   !--
   Traceback (innermost last):
 File
/usr/share/zope/lib/python/Products/WorldPilot/WorldPilot.py, line 1878, in
getpart
   (Object: RoleManager)
 File
/usr/share/zope/lib/python/Products/WorldPilot/WorldPilot.py, line 856, in
getPart
 File
/var/tmp/python/python-root/usr/lib/python1.5/mimetools.py, line 146, in
decode
   ValueError: unknown Content-Transfer-Encoding: 8bit
"mimetools.encode/decode" do not handle transfer encodings "7bit", "8bit"
and
  "binary", because there is nothing to do for them.

  "WordPilot" should check for them and not call "decode".


   Another strange thing is the path to the mimetools.py
file in the
   traceback:
/var/tmp/python/python-root/usr/lib/python1.5/.  The
   /var/tmp/python/python-root path should have only been
used during the
   creation of the python rpm, but it's showing up now. The
"*.pyc" files remember the name they have been compiled from.

  Dieter

 smime.p7s


Re: [Zope] WorldPilot - Regular messages are attachments? (PatchFix)

2000-06-08 Thread Bryan Stillwell

On Thu, 8 Jun 2000, Paul Gresham wrote:

 Be careful here ... I think you'll also find that should you try to download
 the attachement, It'll kill Zope. If you're running Zope with -D it'll
 restart, otherwise you'll find you have no web site after trying to
 download. I'm not sure what it does to kill Zope as there is no error, just
 death. It seems to be a bit intermittent as well, which doesn't help.

Actually that traceback was from when I tried to view the
message(attachment), and it didn't kill my Zope process.


 I'm trying to fix the problem and will post the patch once it's ready,
 hopefully next week when I get back from China. (I'm nothing to do with the
 WorldPilot chaps, I just want to use the s/ware)

I'm already ahead of you there.  I went ahead and debugged it myself and
was able to fix the problem!  Here's the patch I came up with:

 CUT 
--- WorldPilot.py~  Fri Mar 10 13:04:29 2000
+++ WorldPilot.py   Thu Jun  8 10:01:04 2000
@@ -648,8 +648,8 @@
 ))
 else:
 offset=0
-   BodyType=ST[0]
-BodySubtype=ST[1]
+BodyType=string.upper(ST[0])
+BodySubtype=string.upper(ST[1])
 BodyParameterList=ST[2]
 BodyId=ST[3]
 BodyDescription=ST[4]
 CUT 


Enjoy!  I hope you had fun in China!

Bryan


___
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] WorldPilot - Regular messages are attachments? (PatchFix)

2000-06-08 Thread Paul Gresham

Excellent, thanks Bryan. I have another question? Do you have problems with
browsers not obtaining the correct filenames of attachments when they are
downloaded, i.e. the file becomes ATT0002.DAT or similar? I have this
problem and also if I choose to download a file and then cancel the dialog,
everything seems to get stuck, and I have to close the browser and start
again.

Regards
Paul

- Original Message -
From: Bryan Stillwell [EMAIL PROTECTED]
To: Paul Gresham [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, June 09, 2000 12:15 AM
Subject: Re: [Zope] WorldPilot - Regular messages are attachments?
(PatchFix)


 On Thu, 8 Jun 2000, Paul Gresham wrote:

  Be careful here ... I think you'll also find that should you try to
download
  the attachement, It'll kill Zope. If you're running Zope with -D it'll
  restart, otherwise you'll find you have no web site after trying to
  download. I'm not sure what it does to kill Zope as there is no error,
just
  death. It seems to be a bit intermittent as well, which doesn't help.

 Actually that traceback was from when I tried to view the
 message(attachment), and it didn't kill my Zope process.


  I'm trying to fix the problem and will post the patch once it's ready,
  hopefully next week when I get back from China. (I'm nothing to do with
the
  WorldPilot chaps, I just want to use the s/ware)

 I'm already ahead of you there.  I went ahead and debugged it myself and
 was able to fix the problem!  Here's the patch I came up with:

  CUT 
 --- WorldPilot.py~ Fri Mar 10 13:04:29 2000
 +++ WorldPilot.py Thu Jun  8 10:01:04 2000
 @@ -648,8 +648,8 @@
  ))
  else:
  offset=0
 - BodyType=ST[0]
 -BodySubtype=ST[1]
 +BodyType=string.upper(ST[0])
 +BodySubtype=string.upper(ST[1])
  BodyParameterList=ST[2]
  BodyId=ST[3]
  BodyDescription=ST[4]
  CUT 


 Enjoy!  I hope you had fun in China!

 Bryan




___
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] WorldPilot - Regular messages are attachments?

2000-06-07 Thread Dieter Maurer

Bryan Stillwell writes:
  Here's the traceback I received:
  
Sorry, a Zope error occurred.p
  !--
  Traceback (innermost last):
File /usr/share/zope/lib/python/Products/WorldPilot/WorldPilot.py, line 1878, in 
 getpart
  (Object: RoleManager)
File /usr/share/zope/lib/python/Products/WorldPilot/WorldPilot.py, line 856, in 
 getPart
File /var/tmp/python/python-root/usr/lib/python1.5/mimetools.py, line 146, in 
 decode
  ValueError: unknown Content-Transfer-Encoding: 8bit
"mimetools.encode/decode" do not handle transfer encodings "7bit", "8bit"
and "binary", because there is nothing to do for them.

"WordPilot" should check for them and not call "decode".

  Another strange thing is the path to the mimetools.py file in the
  traceback: /var/tmp/python/python-root/usr/lib/python1.5/.  The
  /var/tmp/python/python-root path should have only been used during the
  creation of the python rpm, but it's showing up now.
The "*.pyc" files remember the name they have been compiled from.


Dieter

___
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] WorldPilot - Regular messages are attachments?

2000-06-07 Thread Bryan Stillwell

On Wed, 7 Jun 2000, Dieter Maurer wrote:

 Bryan Stillwell writes:
   Here's the traceback I received:
   
 Sorry, a Zope error occurred.p
   !--
   Traceback (innermost last):
 File /usr/share/zope/lib/python/Products/WorldPilot/WorldPilot.py, line 1878, 
in getpart
   (Object: RoleManager)
 File /usr/share/zope/lib/python/Products/WorldPilot/WorldPilot.py, line 856, in 
getPart
 File /var/tmp/python/python-root/usr/lib/python1.5/mimetools.py, line 146, in 
decode
   ValueError: unknown Content-Transfer-Encoding: 8bit
 "mimetools.encode/decode" do not handle transfer encodings "7bit", "8bit"
 and "binary", because there is nothing to do for them.
 
 "WordPilot" should check for them and not call "decode".

Yeah, I finally got to RTFS and found a bug in their code.  I was able to
fix my problem by changing these two lines in WorldPilot.py:

BodyType=ST[0]
BodySubtype=ST[1]

To these:

BodyType=string.upper(ST[0])
BodySubtype=string.upper(ST[1])

I found out after adding some debug info to the code that it was
comparing BodyType to see if it was set to 'TEXT', but when it was doing
the comparison it was actually set to 'text', so it would fail.  I didn't
bother finding out why 'text' was in all lower case...


   Another strange thing is the path to the mimetools.py file in the
   traceback: /var/tmp/python/python-root/usr/lib/python1.5/.  The
   /var/tmp/python/python-root path should have only been used during the
   creation of the python rpm, but it's showing up now.
 The "*.pyc" files remember the name they have been compiled from.

Makes sense...

Thanks for the help!  I'm going to send a patch to the WorldPilot people
to see if they'll fix it before the next release.


Have a great day!

Bryan


___
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 )