[Zope-dev] ExternalEditor losing its lock?

Casey Duncan casey@zope.com
Tue, 4 Feb 2003 09:09:14 -0500


--------------Boundary-00=_EBFSEACV79508R40HT2W
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hmmm, I think this may be due to a typo in the helper app code. Try apply=
ing=20
the attached diff to zopeedit.py and see if it helps.

-Casey

On Tuesday 04 February 2003 03:58 am, Jean Jordaan wrote:
> Hi all
>=20
> A couple of times now, I've noticed this:
>=20
>   - I open a Python Script using ExternalEditor. A GET is issued,
>     My editor starts up, and a LOCK gets set.
>=20
>   - Now I view and execute the script (more GETs) while editing
>     and saving in my editor (PUTs get issued).
>=20
>   - That's fine. But then the lock goes away, and I successfully
>     edit the script in the ZMI: a POST goes thru. But there hasn't
>     been any UNLOCK yet. This shouldn't happen, right?
>=20
> (Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, linux2)
>=20
> Excerpt from Z2.log:
>=20
> 192.168.1.5 - jean [03/Feb/2003:18:25:38 +0200] "GET /externalEdit_/tes=
t=20
> HTTP/1.1" 200 1088 "http://blommie:17081/manage_main" "Mozilla/5.0 (X11=
;=20
> U; Linux i686; en-US; rv:1.1) Gecko/20021212"
> 192.168.1.5 - jean [03/Feb/2003:18:25:40 +0200] "LOCK /test HTTP/1.1"=20
> 200 789 "" "Zope External Editor/0.6"
> 192.168.1.5 - jean [03/Feb/2003:18:25:56 +0200] "PUT /test HTTP/1.1" 20=
4=20
> 251 "" "Zope External Editor/0.6"
> 192.168.1.5 - jean [03/Feb/2003:18:25:58 +0200] "GET=20
> /test/manage_workspace HTTP/1.1" 302 467=20
> "http://blommie:17081/manage_main" "Mozilla/5.0 (X11; U; Linux i686;=20
> en-US; rv:1.1) Gecko/20021212"
> 192.168.1.5 - jean [04/Feb/2003:10:32:25 +0200] "PUT /test HTTP/1.1" 20=
4=20
> 251 "" "Zope External Editor/0.6"
> 192.168.1.5 - jean [04/Feb/2003:10:46:11 +0200] "POST /test HTTP/1.1"=20
> 200 12877 "http://blommie:17081/test/ZPythonScriptHTML_editForm"=20
> "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021212"
> 192.168.1.5 - jean [04/Feb/2003:10:46:11 +0200] "GET=20
> /manage_page_style.css HTTP/1.1" 200 3014 "http://blommie:17081/test"=20
> "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021212"
> 192.168.1.5 - jean [04/Feb/2003:10:46:16 +0200] "PUT /test HTTP/1.1" 20=
4=20
> 251 "" "Zope External Editor/0.6"
> 192.168.1.5 - jean [04/Feb/2003:10:46:18 +0200] "GET=20
> /test/manage_workspace HTTP/1.1" 302 467 "http://blommie:17081/test"=20
> "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021212"
>=20
> --=20
> Jean Jordaan
> http://www.upfrontsystems.co.za
>=20
>=20
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -=20
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope )
>=20

--------------Boundary-00=_EBFSEACV79508R40HT2W
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="zopeedit.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="zopeedit.diff"

*** zopeedit.py.old	Tue Feb  4 09:06:48 2003
--- zopeedit.py	Tue Feb  4 09:07:14 2003
***************
*** 415,421 ****
              return 0 # Already have a lock token
          
          headers = {'Content-Type':'text/xml; charset="utf-8"',
!                    'Timeout':'infinite',
                     'Depth':'infinity',
                    }
          body = ('<?xml version="1.0" encoding="utf-8"?>\n'
--- 415,421 ----
              return 0 # Already have a lock token
          
          headers = {'Content-Type':'text/xml; charset="utf-8"',
!                    'Timeout':'infinity',
                     'Depth':'infinity',
                    }
          body = ('<?xml version="1.0" encoding="utf-8"?>\n'

--------------Boundary-00=_EBFSEACV79508R40HT2W--