Re: Re: [Zope-dev] WebDav Bug? -- And some comments on how great WebDAV is ;-)
Hi Brian, that proposal sounds very good to me. Could it be enhanced in a way that we can add an add automatic extension when served by webdav. What I mean by that is that an object without extension is seen as having say .html appended to it when it is access by webdav. So we can use all these extension based web authoring tools without changing the python way of doing things. Robert - Original Message - From: Brian Lloyd [EMAIL PROTECTED] To: Joachim Werner [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 19, 2001 10:47 PM Subject: RE: Re: [Zope-dev] WebDav Bug? -- And some comments on how great WebDAV is ;-) Some additional issues when using the CMF: - There is this really great idea that you can create a news item by just posting a MyNews.news file to your Member folder. The first problem is that Word does not let you save an HTML file as .news, so we changed the rules in CMF and upload news_MyNews.htm files FYI - I have a proposal that could also be used to address this. It would be great to get some feedback on it: http://dev.zope.org/Wikis/DevSite/Proposals/ObjectTypeAssociationAndDeathToI ndexHtml Brian Lloyd[EMAIL PROTECTED] Zope Corporation www.zope.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Medusa Patch Lost
A zope-specific patch to medusa seems to have got accidentally lost between 2.3.x and 2.4. The patch below allows Zope to handle http requests as if it was a proxy, ie: GET http://servername/x/y/z HTTP/1.0 in addition to the more normal mode as if it was an origin server: GET /x/y/z HTTP/1.0 (there is an rfc for this, but I forget the number :-( (With the Collector down, I hope this is the best place for uncontroversial patches. Is anyone from DC looking out for them?) diff -c -r1.1.1.6 -r1.2 *** http_server.py 10 Sep 2001 14:55:08 - 1.1.1.6 --- http_server.py 20 Sep 2001 12:43:53 - 1.2 *** *** 713,719 return m return '' ! REQUEST = re.compile ('([^ ]+) ([^ ]+)(( HTTP/([0-9.]+))$|$)') def crack_request (r): m = REQUEST.match (r) --- 713,719 return m return '' ! REQUEST = re.compile('([^ ]+) (?:[^ :?#]+://[^ ?#/]*)?([^ ]+)(( HTTP/([0-9.]+))$|$)') def crack_request (r): m = REQUEST.match (r) Toby Dickenson [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Medusa Patch Lost
Thanks for the hint. I re-applied the patch to the CVS trunk and branch. Andreas - Original Message - From: Toby Dickenson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 20, 2001 09:12 Subject: [Zope-dev] Medusa Patch Lost A zope-specific patch to medusa seems to have got accidentally lost between 2.3.x and 2.4. The patch below allows Zope to handle http requests as if it was a proxy, ie: GET http://servername/x/y/z HTTP/1.0 in addition to the more normal mode as if it was an origin server: GET /x/y/z HTTP/1.0 (there is an rfc for this, but I forget the number :-( (With the Collector down, I hope this is the best place for uncontroversial patches. Is anyone from DC looking out for them?) diff -c -r1.1.1.6 -r1.2 *** http_server.py 10 Sep 2001 14:55:08 - 1.1.1.6 --- http_server.py 20 Sep 2001 12:43:53 - 1.2 *** *** 713,719 return m return '' ! REQUEST = re.compile ('([^ ]+) ([^ ]+)(( HTTP/([0-9.]+))$|$)') def crack_request (r): m = REQUEST.match (r) --- 713,719 return m return '' ! REQUEST = re.compile('([^ ]+) (?:[^ :?#]+://[^ ?#/]*)?([^ ]+)(( HTTP/([0-9.]+))$|$)') def crack_request (r): m = REQUEST.match (r) Toby Dickenson [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: Re: [Zope-dev] WebDav Bug? -- And some comments on how great WebDAV is ;-)
Hi Brian, that proposal sounds very good to me. Could it be enhanced in a way that we can add an add automatic extension when served by webdav. What I mean by that is that an object without extension is seen as having say .html appended to it when it is access by webdav. So we can use all these extension based web authoring tools without changing the python way of doing things. This is an idea that has been kicking around for a while - I am somewhat resistant to it because I have been trying hard to fight for less magic in Zope. It is very hard to implement DWIM (Do What I Mean) and have it do the right thing in all situations - it often turns out to be fragile and easily broken as the system evolves. That's not to say that we absolutely wouldn't do it - but there are enough internal ramifications and questions to be answered that I don't see how this would get done by 2.5. I'd be happy to see a proposal that addresses how deeply that magic would have to affect other parts of the system (as DAV support is largely implemented on top of other APIs) and the scope of the behavior and effort (I would expect that if DAV acted that way, then FTP should too). soapbox IMHO, I'd rather see the things that make using file extensions a pain in the first place go away. The death to index_html part of my proposal is a first step toward that. If web-oriented tools expect to be able to use file extensions, then Zope needs to do what people expect. If people trying to start using Zope are immediately stymied by bizarre issues with something that they take so for granted (file extensions), they'll never get far enough to see all of the things that are great about Zope. /soapbox Brian Lloyd[EMAIL PROTECTED] Zope Corporation www.zope.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: Re: [Zope-dev] WebDav Bug? -- And some comments on how great WebDAV is ;-)
- Original Message - From: Brian Lloyd [EMAIL PROTECTED] To: Robert Rottermann [EMAIL PROTECTED]; Joachim Werner [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, September 20, 2001 10:49 AM Subject: RE: Re: [Zope-dev] WebDav Bug? -- And some comments on how great WebDAV is ;-) Hi Brian, that proposal sounds very good to me. Could it be enhanced in a way that we can add an add automatic extension when served by webdav. What I mean by that is that an object without extension is seen as having say .html appended to it when it is access by webdav. So we can use all these extension based web authoring tools without changing the python way of doing things. This is an idea that has been kicking around for a while - I am somewhat resistant to it because I have been trying hard to fight for less magic in Zope. It is very hard to implement DWIM (Do What I Mean) and have it do the right thing in all situations - it often turns out to be fragile and easily broken as the system evolves. Less magic is good. Longer term, it seems like this can be addressed by the Component architecture, can't it? Ideally the WebDAV Presentation Component would be given some clues about how to represent the object in WebDAV. Or maybe there will be a selection of WebDAV components that provide a variety of ways to deal with it. soapbox IMHO, I'd rather see the things that make using file extensions a pain in the first place go away. The death to index_html part of my proposal is a first step toward that. If web-oriented tools expect to be able to use file extensions, then Zope needs to do what people expect. ...while still balancing the desire to easily access objects and methods via Python. Tricky. Kevin ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] re: Subclassing ZObjectManager in ZClasses
re: http://lists.zope.org/pipermail/zope-dev/2000-March/004034.html This message is about 1.5 years old, but no replies?, I haven't seen any similar messages or howtos? --Alexandre Ratti Fri, 31 Mar 2000 Summary: (when creating a folderish ZClass and cascading base classes) if ZObjectManager isn't subclassed at 1st level, objects can be added to the folderish ZClass instances but they don't show in the manage_main object list. Here I first created MyBaseClass, then I subclassed it together with ZObjectManager when creating MyTestClass ... when I add objects in an instance of MyTestClass they do not show in the object list (Content view). I *think* they are actually added because I cannot add an additional one with the same ID: I get an ID already in use error. It's not that bad, but I can't create a standard base class, then use it to create a folderish variant. I have the same symptoms, objects dont display in a folder subclass, but are there. Heres how I fixed it: Your base class must be the last in the class inheritance list. You must add all other base classes first. This will almost always be a problem because most base classes start with ZClass... and will be last alphabetically. (this will be much easier to fix if/when you can change, or at least reorder, the base classes of an object) eg: ZObject, ZObjectManager, CatalogAwareBase, MyBaseClass If you have a complicated object, I think you can export it in XML, reorder the base classes, reimport. But adding/removing classes this way doesn't update the management interface tabs. Daniel Rogahn [EMAIL PROTECTED] http://www.d.umn.edu/~drogahn/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: Re: [Zope-dev] WebDav Bug? -- id != name?
On Thursday 20 September 2001 11:03 am, Kevin Dangoor allegedly wrote: [snip] Less magic is good. Longer term, it seems like this can be addressed by the Component architecture, can't it? Ideally the WebDAV Presentation Component would be given some clues about how to represent the object in WebDAV. Or maybe there will be a selection of WebDAV components that provide a variety of ways to deal with it. soapbox IMHO, I'd rather see the things that make using file extensions a pain in the first place go away. The death to index_html part of my proposal is a first step toward that. If web-oriented tools expect to be able to use file extensions, then Zope needs to do what people expect. ...while still balancing the desire to easily access objects and methods via Python. Tricky. Kevin Possibly just giving the user the ability to specify a name for an object separate from it's id so that an extension could be used could be a short-term solution. Or even just a property DAV_extension that lets you specify the file extension when using webDAV. When files are uploaded via WebDAV, the ext is stripped from the id and stored in this property. It is reappended by Zope when accessing the object through WebDAV. At least that way it is magic is under your direct control. -Casey ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: Re: [Zope-dev] WebDav Bug? -- And some comments on how greatWebDAV is ;-)
I agree that Brian's proposal is a good idea. --On Friday, September 21, 2001 08:46:42 AM +0200 Robert Rottermann [EMAIL PROTECTED] wrote: Hi Brian, that proposal sounds very good to me. Could it be enhanced in a way that we can add an add automatic extension when served by webdav. What I mean by that is that an object without extension is seen as having say .html appended to it when it is access by webdav. So we can use all these extension based web authoring tools without changing the python way of doing things. This wouldn't work very well for two reasons: 1. Sites like ours use a mix of DTML, Python Scripts and other things. It would make some sense to map the DTML method register_user to register_user.html but the Python Script would want to be register_user.py. 2. The object on a Zope site already contain type information that can and should be leveraged for outgoing access. My first cut suggestion would be to implement a separate outgoing mapping table driven by the object's meta-type attribute (with provision for CMF to override this to use it's different notion of type). Robert - Original Message - From: Brian Lloyd [EMAIL PROTECTED] To: Joachim Werner [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 19, 2001 10:47 PM Subject: RE: Re: [Zope-dev] WebDav Bug? -- And some comments on how great WebDAV is ;-) Some additional issues when using the CMF: - There is this really great idea that you can create a news item by just posting a MyNews.news file to your Member folder. The first problem is that Word does not let you save an HTML file as .news, so we changed the rules in CMF and upload news_MyNews.htm files FYI - I have a proposal that could also be used to address this. It would be great to get some feedback on it: http://dev.zope.org/Wikis/DevSite/Proposals/ObjectTypeAssociationAndDeath ToI ndexHtml Brian Lloyd[EMAIL PROTECTED] Zope Corporation www.zope.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: Re: [Zope-dev] WebDav Bug? -- And some comments on how greatWebDAV is ;-)
- Original Message - From: Dan L. Pierson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 20, 2001 5:56 PM Subject: Re: Re: [Zope-dev] WebDav Bug? -- And some comments on how greatWebDAV is ;-) I agree that Brian's proposal is a good idea. --On Friday, September 21, 2001 08:46:42 AM +0200 Robert Rottermann [EMAIL PROTECTED] wrote: Hi Brian, that proposal sounds very good to me. Could it be enhanced in a way that we can add an add automatic extension when served by webdav. What I mean by that is that an object without extension is seen as having say .html appended to it when it is access by webdav. So we can use all these extension based web authoring tools without changing the python way of doing things. This wouldn't work very well for two reasons: 1. Sites like ours use a mix of DTML, Python Scripts and other things. It would make some sense to map the DTML method register_user to register_user.html but the Python Script would want to be register_user.py. Since a show yourself as .html should be configurable on a per folder or per dtml-method/document instance base python scripts would never be bothered. In fact I think only ZPTemplates will ever need such a mapping. ZPT is such much nicer than DTML that soon no new sites will be done not using it. Templates alredy have a half hearted such mapping (as explained in the tutorial which is reachable from the Zope home page). It just does not seam to work for non *nix computers. Robert 2. The object on a Zope site already contain type information that can and should be leveraged for outgoing access. My first cut suggestion would be to implement a separate outgoing mapping table driven by the object's meta-type attribute (with provision for CMF to override this to use it's different notion of type). Robert - Original Message - From: Brian Lloyd [EMAIL PROTECTED] To: Joachim Werner [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 19, 2001 10:47 PM Subject: RE: Re: [Zope-dev] WebDav Bug? -- And some comments on how great WebDAV is ;-) Some additional issues when using the CMF: - There is this really great idea that you can create a news item by just posting a MyNews.news file to your Member folder. The first problem is that Word does not let you save an HTML file as .news, so we changed the rules in CMF and upload news_MyNews.htm files FYI - I have a proposal that could also be used to address this. It would be great to get some feedback on it: http://dev.zope.org/Wikis/DevSite/Proposals/ObjectTypeAssociationAndDeath ToI ndexHtml Brian Lloyd[EMAIL PROTECTED] Zope Corporation www.zope.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: Re: [Zope-dev] WebDav Bug? -- id != name?
Or even just a property DAV_extension that lets you specify the file extension when using webDAV. When files are uploaded via WebDAV, the ext is stripped from the id and stored in this property. It is reappended by Zope when accessing the object through WebDAV. At least that way it is magic is under your direct control. The problem (a problem) is that accessing the object through WebDAV is not a tightly bounded thing. DAV is built over HTTP, and (intentionally) GET and PUT requests by DAV clients are not distinguishable from regular HTTP intent (thus the source vs. rendered problem). An example: a DAV client does a PROPFIND on a folder, and the folder lies and says mymethod.html is there (when its real id is just mymethod). The client will likely then do a HEAD or a GET on it - which doesn't go through any DAV code at all and the lookup will fail with a 404 Not Found. That means that if we were to try to implement this, it is not a simple matter of changing the DAV code, as this would affect publishing, security, potentially all name lookup code and who knows what else :( Again, that does not mean it could not happen, but someone will need to invest a non-trivial amount of time to come up with a proposal that comprehensively assesses (and provides recommendations for addressing) all of the side effects so that the community can make a reasonable decision on whether it is worth the effort. Brian Lloyd[EMAIL PROTECTED] Zope Corporation www.zope.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] re: Subclassing ZObjectManager in ZClasses
Daniel Rogahn writes: Summary: (when creating a folderish ZClass and cascading base classes) if ZObjectManager isn't subclassed at 1st level, objects can be added to the folderish ZClass instances but they don't show in the manage_main object list. I can explain, why it happens. I think it is a bug, at least a mis-feature. But I cannot change it :-( OFS.SimpleItem.Item provides stupid (!) implementations of objectItems, objectIds and objectValues (all return the empty tuple). I do not know, why in hell a non-ObjectManager implements ObjectManager methods. Because it does, you get the behaviour you complain about. OFS.SimpleItem.Item is essentially what is called ZObject in ZClasses and what you get when the Include standard Zope object behavior is checked. When your class (deriving von ZObject) comes before ZObjectManager, then its stupid objectItems method is inherited and not that of ZObjectManager. This changes, when you switch the inheritance order. The solution: OFS.SimpleItem.Item should not define ObjectManager methods. Unfortunately, many dtml-tree applications will probably break then. Affected will be dtml-tree occurences with branches=objectValues. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Structure-text : html
When I use dtml-var StructureTextDoc fmt=structured-text I got html /html in the result. Are there any reason that it should be there? I wounder how can structured text generate valid html or be used in wap applications. If structured text is hard coded to output unnecessary html then I consider it a serious bug. And there should be coding rules that ensure in future no such bugs exist in Zope. Rgs, Kent Sin - kentsin.weblogs.com kentsin.imeme.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Structure-text : html
AFAIK this is the right behavior and not a bug. you ask for the StructureText document to be rendered and you inform the rendering machinery that the document is in structured text. the rendering process will output HTML. i think what you want is to simply say dtml-var StructureTextDoc without the fmt flag. that should get you the raw structured text. the rendering process then assumes the document is already in some kind of HTML format and does not try to generate HTML tags. jens On Thursday, September 20, 2001, at 07:14 , Sin Hang Kin wrote: When I use dtml-var StructureTextDoc fmt=structured-text I got html /html in the result. Are there any reason that it should be there? I wounder how can structured text generate valid html or be used in wap applications. If structured text is hard coded to output unnecessary html then I consider it a serious bug. And there should be coding rules that ensure in future no such bugs exist in Zope. Rgs, Kent Sin - kentsin.weblogs.com kentsin.imeme.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] DISCUSS: Community checkins for CVS
On Thu, 20 Sep 2001, Paul Everitt wrote: So, let's begin what I'm sure will be a lively and illuminating discussion. :^) First man out? :-) Will a ZPL-ish license [1] be accepted (declared, ref. paragraph 4 of the Zope Contributor Agreement) by the Zope Corporation? [1] http://www.thingamy.org/tpl -Morten ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )