• Deliverance Discussion

  • Re: Re: Kupu won't save through Deliverance

    from unshift on Jul 02, 2009 09:14 PM
    Ok, I tracked down the bug.  It's in WSGIProxy's exactproxy.py, so it's
    technically not a deliverance issue.
    
    If you're in a virtualenv you can edit
    ./lib/python2.5/site-packages/WSGIProxy-0.1-py2.5.egg/wsgiproxy/exactproxy.py
    and make the following change:
    
    79,80c79,80
    <     if environ.get('Content-Type'):
    <         headers['Content-Type'] = environ['Content-Type']
    ---
    >     if environ.get('CONTENT_TYPE'):
    >         headers['Content-Type'] = environ['CONTENT_TYPE']
    
    Then restart the deliverance proxy.  I have Kupu forms and my PloneFormGen
    form working now.
    
    I'll submit a proper ticket and patch to WSGIProxy.
    
    
      - Matt
    
    
    
    On Thu, Jul 2, 2009 at 8:12 PM, Matt Perry <matt@...> wrote:
    
    > Thanks for the tip!  I ran tcpdump on port 8080 (Zope server) and it seems
    > that the content-type header is missing in the POST request when accessed
    > through the deliverance proxy.
    >
    > This probably doesn't matter so much for the regular forms on the Plone
    > site, but PloneFormGen and Kupu forms have enctype="multipart/form-data"
    > which is being ignored.
    >
    >
    >
    >
    >
    > On Thu, Jul 2, 2009 at 3:06 PM, Tres Seaver <tseaver@...> wrote:
    >
    >> -----BEGIN PGP SIGNED MESSAGE-----
    >> Hash: SHA1
    >>
    >> Matt Perry wrote:
    >> > Oddly enough the headers look pretty similar between firebug <->
    >> deliverance
    >> > and firebug <-> Plone.
    >> >
    >> > However when I changed my form action to GET, it worked fine.  There has
    >> to
    >> > be an error somewhere in the underlying subtleties of proxying a POST
    >> > request -- either in the deliverance proxy itself, or in the PasteWSGI
    >> > server.  I don't even know where to begin with PasteWSGI and I've only
    >> begun
    >> > looking at the deliverance code, so I'm not yet sure how much of the
    >> actual
    >> > proxying mechanics is handled by deliverance.
    >>
    >> There was a bug in Paste 1.6 which failed to forward the
    >> 'Content-Length' header to the origin server:
    >>
    >>  http://trac.pythonpaste.org/pythonpaste/ticket/273
    >>
    >> which caused POSTs to fail.  I don't know if that is relevant to your
    >> case.
    >>
    >>
    >> Tres.
    >> - --
    >> ===================================================================
    >> Tres Seaver          +1 540-429-0999          tseaver@...
    >> Palladion Software   "Excellence by Design"    http://palladion.com
    >> -----BEGIN PGP SIGNATURE-----
    >> Version: GnuPG v1.4.6 (GNU/Linux)
    >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
    >>
    >> iD8DBQFKTQVJ+gerLs4ltQ4RAqMUAKCWeLU55o/eKns/Lk7yJ7QlzYYqJwCdHpSL
    >> YU5CpEYlqj51NODZ6c3AIXw=
    >> =nfqW
    >> -----END PGP SIGNATURE-----
    >>
    >>
    >> --
    >> Archive:
    >> http://www.coactivate.org/projects/deliverance/lists/deliverance-discussion/archive/2009/07/1246561637346
    >> To unsubscribe send an email with subject "unsubscribe" to
    >> deliverance-devel@....  Please contact
    >> deliverance-devel-manager@... for questions.
    >>
    >>
    >
    
    
    Thread Outline:
  • Re: Re: Kupu won't save through Deliverance

    from unshift on Jul 02, 2009 09:21 PM
    I checked out svn and the fix is already there, funny enough:
    http://www.coactivate.org/projects/deliverance/lists/deliverance-discussion/archive/2008/12/1229598411425/forum_view
    
    Don, If you update your WSGIProxy to the trunk version and copy it into your
    site-packages directory, you should be all set with Kupu.
    
      - Matt
    
    
    On Thu, Jul 2, 2009 at 9:13 PM, Matt Perry <matt@...> wrote:
    
    > Ok, I tracked down the bug.  It's in WSGIProxy's exactproxy.py, so it's
    > technically not a deliverance issue.
    >
    > If you're in a virtualenv you can edit
    > ./lib/python2.5/site-packages/WSGIProxy-0.1-py2.5.egg/wsgiproxy/exactproxy.py
    > and make the following change:
    >
    > 79,80c79,80
    > <     if environ.get('Content-Type'):
    > <         headers['Content-Type'] = environ['Content-Type']
    > ---
    > >     if environ.get('CONTENT_TYPE'):
    > >         headers['Content-Type'] = environ['CONTENT_TYPE']
    >
    > Then restart the deliverance proxy.  I have Kupu forms and my PloneFormGen
    > form working now.
    >
    > I'll submit a proper ticket and patch to WSGIProxy.
    >
    >
    >   - Matt
    >
    >
    >
    >
    > On Thu, Jul 2, 2009 at 8:12 PM, Matt Perry <matt@...> wrote:
    >
    >> Thanks for the tip!  I ran tcpdump on port 8080 (Zope server) and it seems
    >> that the content-type header is missing in the POST request when accessed
    >> through the deliverance proxy.
    >>
    >> This probably doesn't matter so much for the regular forms on the Plone
    >> site, but PloneFormGen and Kupu forms have enctype="multipart/form-data"
    >> which is being ignored.
    >>
    >>
    >>
    >>
    >>
    >> On Thu, Jul 2, 2009 at 3:06 PM, Tres Seaver <tseaver@...>wrote:
    >>
    >>> -----BEGIN PGP SIGNED MESSAGE-----
    >>> Hash: SHA1
    >>>
    >>> Matt Perry wrote:
    >>> > Oddly enough the headers look pretty similar between firebug <->
    >>> deliverance
    >>> > and firebug <-> Plone.
    >>> >
    >>> > However when I changed my form action to GET, it worked fine.  There
    >>> has to
    >>> > be an error somewhere in the underlying subtleties of proxying a POST
    >>> > request -- either in the deliverance proxy itself, or in the PasteWSGI
    >>> > server.  I don't even know where to begin with PasteWSGI and I've only
    >>> begun
    >>> > looking at the deliverance code, so I'm not yet sure how much of the
    >>> actual
    >>> > proxying mechanics is handled by deliverance.
    >>>
    >>> There was a bug in Paste 1.6 which failed to forward the
    >>> 'Content-Length' header to the origin server:
    >>>
    >>>  http://trac.pythonpaste.org/pythonpaste/ticket/273
    >>>
    >>> which caused POSTs to fail.  I don't know if that is relevant to your
    >>> case.
    >>>
    >>>
    >>> Tres.
    >>> - --
    >>> ===================================================================
    >>> Tres Seaver          +1 540-429-0999          tseaver@...
    >>> Palladion Software   "Excellence by Design"    http://palladion.com
    >>> -----BEGIN PGP SIGNATURE-----
    >>> Version: GnuPG v1.4.6 (GNU/Linux)
    >>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
    >>>
    >>> iD8DBQFKTQVJ+gerLs4ltQ4RAqMUAKCWeLU55o/eKns/Lk7yJ7QlzYYqJwCdHpSL
    >>> YU5CpEYlqj51NODZ6c3AIXw=
    >>> =nfqW
    >>> -----END PGP SIGNATURE-----
    >>>
    >>>
    >>> --
    >>> Archive:
    >>> http://www.coactivate.org/projects/deliverance/lists/deliverance-discussion/archive/2009/07/1246561637346
    >>> To unsubscribe send an email with subject "unsubscribe" to
    >>> deliverance-devel@....  Please contact
    >>> deliverance-devel-manager@... for questions.
    >>>
    >>>
    >>
    >
    
    
    • Re: Re: Kupu won't save through Deliverance

      from dfick on Jul 03, 2009 08:14 AM
      Thanks Matt.  I dropped in the updated exactproxy.py and I can confirm  
      that the problem with Kupu editing and other multipart form posts  
      seems to be fixed.
      
      I'm not sure which/where is the authoritative WSGIProxy svn  
      repository.  I ended up pulling from Webware for Python (http://svn.w4py.org/Paste/WSGIProxy/trunk 
      )  Can anyone confirm that this is the best place to get this update?
      
      Thanks,
      Don
      
      Don Fick
      don@...
      
      
      
      On Jul 2, 2009, at 9:21 PM, Matt Perry wrote:
      
      > I checked out svn and the fix is already there, funny enough: http://www.coactivate.org/projects/deliverance/lists/deliverance-discussion/archive/2008/12/1229598411425/forum_view
      >
      > Don, If you update your WSGIProxy to the trunk version and copy it  
      > into your site-packages directory, you should be all set with Kupu.
      >
      >   - Matt
      >
      >
      > On Thu, Jul 2, 2009 at 9:13 PM, Matt Perry <matt@...> wrote:
      > Ok, I tracked down the bug.  It's in WSGIProxy's exactproxy.py, so  
      > it's technically not a deliverance issue.
      >
      > If you're in a virtualenv you can edit ./lib/python2.5/site-packages/ 
      > WSGIProxy-0.1-py2.5.egg/wsgiproxy/exactproxy.py and make the  
      > following change:
      >
      > 79,80c79,80
      > <     if environ.get('Content-Type'):
      > <         headers['Content-Type'] = environ['Content-Type']
      > ---
      > >     if environ.get('CONTENT_TYPE'):
      > >         headers['Content-Type'] = environ['CONTENT_TYPE']
      >
      > Then restart the deliverance proxy.  I have Kupu forms and my  
      > PloneFormGen form working now.
      >
      > I'll submit a proper ticket and patch to WSGIProxy.
      >
      >
      >   - Matt
      >
      >
      >
      >
      > On Thu, Jul 2, 2009 at 8:12 PM, Matt Perry <matt@...> wrote:
      > Thanks for the tip!  I ran tcpdump on port 8080 (Zope server) and it  
      > seems that the content-type header is missing in the POST request  
      > when accessed through the deliverance proxy.
      >
      > This probably doesn't matter so much for the regular forms on the  
      > Plone site, but PloneFormGen and Kupu forms have enctype="multipart/ 
      > form-data" which is being ignored.
      >
      >
      >
      >
      >
      > On Thu, Jul 2, 2009 at 3:06 PM, Tres Seaver <tseaver@...>  
      > wrote:
      > -----BEGIN PGP SIGNED MESSAGE-----
      > Hash: SHA1
      >
      > Matt Perry wrote:
      > > Oddly enough the headers look pretty similar between firebug <->  
      > deliverance
      > > and firebug <-> Plone.
      > >
      > > However when I changed my form action to GET, it worked fine.   
      > There has to
      > > be an error somewhere in the underlying subtleties of proxying a  
      > POST
      > > request -- either in the deliverance proxy itself, or in the  
      > PasteWSGI
      > > server.  I don't even know where to begin with PasteWSGI and I've  
      > only begun
      > > looking at the deliverance code, so I'm not yet sure how much of  
      > the actual
      > > proxying mechanics is handled by deliverance.
      >
      > There was a bug in Paste 1.6 which failed to forward the
      > 'Content-Length' header to the origin server:
      >
      >  http://trac.pythonpaste.org/pythonpaste/ticket/273
      >
      > which caused POSTs to fail.  I don't know if that is relevant to  
      > your case.
      >
      >
      > Tres.
      > - --
      > ===================================================================
      > Tres Seaver          +1 540-429-0999          tseaver@...
      > Palladion Software   "Excellence by Design"    http://palladion.com
      > -----BEGIN PGP SIGNATURE-----
      > Version: GnuPG v1.4.6 (GNU/Linux)
      > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
      >
      > iD8DBQFKTQVJ+gerLs4ltQ4RAqMUAKCWeLU55o/eKns/Lk7yJ7QlzYYqJwCdHpSL
      > YU5CpEYlqj51NODZ6c3AIXw=
      > =nfqW
      > -----END PGP SIGNATURE-----
      >
      >
      > --
      > Archive: http://www.coactivate.org/projects/deliverance/lists/deliverance-discussion/archive/2009/07/1246561637346
      > To unsubscribe send an email with subject "unsubscribe" to deliverance-devel@... 
      > .  Please contact deliverance-devel-manager@... for  
      > questions.
      >
      >
      >
      >
      >
      >
      > --
      > Archive: http://www.coactivate.org/[…]/1246584088044
      > To unsubscribe send an email with subject "unsubscribe" to deliverance-devel@... 
      > . Please contact deliverance-devel-manager@... for  
      > questions.
      
      
      
      • Re: Re: Kupu won't save through Deliverance

        from gawel on Jul 03, 2009 08:31 AM
        Hi,
        
        On Fri, Jul 3, 2009 at 2:14 PM, Don Fick<don@...> wrote:
        > Thanks Matt.  I dropped in the updated exactproxy.py and I can confirm that
        > the problem with Kupu editing and other multipart form posts seems to be
        > fixed.
        > I'm not sure which/where is the authoritative WSGIProxy svn repository.  I
        > ended up pulling from Webware for Python
        > (http://svn.w4py.org/Paste/WSGIProxy/trunk)  Can anyone confirm that this is
        > the best place to get this update?
        
        I guess http://svn.pythonpaste.org/Paste/WSGIProxy/trunk/ is the
        official repository
        
        --
        Gael
        
        > Thanks,
        > Don
        > Don Fick
        > don@...
        >
        >
        > On Jul 2, 2009, at 9:21 PM, Matt Perry wrote:
        >
        > I checked out svn and the fix is already there, funny enough:
        > http://www.coactivate.org/projects/deliverance/lists/deliverance-discussion/archive/2008/12/1229598411425/forum_view
        >
        > Don, If you update your WSGIProxy to the trunk version and copy it into your
        > site-packages directory, you should be all set with Kupu.
        >
        >   - Matt
        >
        >
        > On Thu, Jul 2, 2009 at 9:13 PM, Matt Perry <matt@...> wrote:
        >>
        >> Ok, I tracked down the bug.  It's in WSGIProxy's exactproxy.py, so it's
        >> technically not a deliverance issue.
        >>
        >> If you're in a virtualenv you can edit
        >> ./lib/python2.5/site-packages/WSGIProxy-0.1-py2.5.egg/wsgiproxy/exactproxy.py
        >> and make the following change:
        >>
        >> 79,80c79,80
        >> <     if environ.get('Content-Type'):
        >> <         headers['Content-Type'] = environ['Content-Type']
        >> ---
        >> >     if environ.get('CONTENT_TYPE'):
        >> >         headers['Content-Type'] = environ['CONTENT_TYPE']
        >>
        >> Then restart the deliverance proxy.  I have Kupu forms and my PloneFormGen
        >> form working now.
        >>
        >> I'll submit a proper ticket and patch to WSGIProxy.
        >>
        >>
        >>   - Matt
        >>
        >>
        >>
        >> On Thu, Jul 2, 2009 at 8:12 PM, Matt Perry <matt@...> wrote:
        >>>
        >>> Thanks for the tip!  I ran tcpdump on port 8080 (Zope server) and it
        >>> seems that the content-type header is missing in the POST request when
        >>> accessed through the deliverance proxy.
        >>>
        >>> This probably doesn't matter so much for the regular forms on the Plone
        >>> site, but PloneFormGen and Kupu forms have enctype="multipart/form-data"
        >>> which is being ignored.
        >>>
        >>>
        >>>
        >>>
        >>> On Thu, Jul 2, 2009 at 3:06 PM, Tres Seaver <tseaver@...>
        >>> wrote:
        >>>>
        >>>> -----BEGIN PGP SIGNED MESSAGE-----
        >>>> Hash: SHA1
        >>>>
        >>>> Matt Perry wrote:
        >>>> > Oddly enough the headers look pretty similar between firebug <->
        >>>> > deliverance
        >>>> > and firebug <-> Plone.
        >>>> >
        >>>> > However when I changed my form action to GET, it worked fine.  There
        >>>> > has to
        >>>> > be an error somewhere in the underlying subtleties of proxying a POST
        >>>> > request -- either in the deliverance proxy itself, or in the PasteWSGI
        >>>> > server.  I don't even know where to begin with PasteWSGI and I've only
        >>>> > begun
        >>>> > looking at the deliverance code, so I'm not yet sure how much of the
        >>>> > actual
        >>>> > proxying mechanics is handled by deliverance.
        >>>>
        >>>> There was a bug in Paste 1.6 which failed to forward the
        >>>> 'Content-Length' header to the origin server:
        >>>>
        >>>>  http://trac.pythonpaste.org/pythonpaste/ticket/273
        >>>>
        >>>> which caused POSTs to fail.  I don't know if that is relevant to your
        >>>> case.
        >>>>
        >>>>
        >>>> Tres.
        >>>> - --
        >>>> ===================================================================
        >>>> Tres Seaver          +1 540-429-0999          tseaver@...
        >>>> Palladion Software   "Excellence by Design"    http://palladion.com
        >>>> -----BEGIN PGP SIGNATURE-----
        >>>> Version: GnuPG v1.4.6 (GNU/Linux)
        >>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
        >>>>
        >>>> iD8DBQFKTQVJ+gerLs4ltQ4RAqMUAKCWeLU55o/eKns/Lk7yJ7QlzYYqJwCdHpSL
        >>>> YU5CpEYlqj51NODZ6c3AIXw=
        >>>> =nfqW
        >>>> -----END PGP SIGNATURE-----
        >>>>
        >>>>
        >>>> --
        >>>> Archive:
        >>>> http://www.coactivate.org/projects/deliverance/lists/deliverance-discussion/archive/2009/07/1246561637346
        >>>> To unsubscribe send an email with subject "unsubscribe" to
        >>>> deliverance-devel@....  Please contact
        >>>> deliverance-devel-manager@... for questions.
        >>>>
        >>>
        >>
        >
        >
        >
        > --
        > Archive: http://www.coactivate.org/[…]/1246584088044
        > To unsubscribe send an email with subject "unsubscribe" to
        > deliverance-devel@.... Please contact
        > deliverance-devel-manager@... for questions.
        >
        >
        >
        > --
        > Archive: http://www.coactivate.org/[…]/1246623295637
        > To unsubscribe send an email with subject "unsubscribe" to
        > deliverance-devel@.... Please contact
        > deliverance-devel-manager@... for questions.
        >