You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Bill Mitchell (JIRA)" <ji...@apache.org> on 2007/12/31 03:50:43 UTC

[jira] Created: (AXIS2C-861) Enable client session management through http cookies in libcurl

Enable client session management through http cookies in libcurl
----------------------------------------------------------------

                 Key: AXIS2C-861
                 URL: https://issues.apache.org/jira/browse/AXIS2C-861
             Project: Axis2-C
          Issue Type: Improvement
          Components: transport/http
    Affects Versions: Current (Nightly)
         Environment: Windows XP, Visual Studio 2005, libxml, libcurl
            Reporter: Bill Mitchell


Many existing SOAP services maintain session context through HTTP cookies.  This can be seen in the prevalence of some mechanism to enable client cookies in various SOAP stacks, including the Axis versions in Java and C++.  Without re-implementing all of this in the Axis2C http transport, it would be easy and convenient to provide this support for Axis2C clients built with libcurl.  Libcurl already provides the underlying cookie support, all that is needed is some mechanism to enable/disable this support with, say, the defined but unused maintain_session option.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Resolved: (AXIS2C-861) Enable client session management through http cookies in libcurl

Posted by "Bill Mitchell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Mitchell resolved AXIS2C-861.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Current (Nightly)

This fix to this problem has been incorporated in svn revision 617668.  

There is still the minor issue that performing the curl_global_init call in axis2_libcurl.c is the best that can be done in the current architecture, but is not perfect as it should be done where one is guaranteed to be single threaded.  Absent hooks to do this when the http transport layer is loaded, the only single threaded point is outside in the client application.  If the client application does the call to curl_global_init explicitly itself, the second call here in axis2_libcurl.c doesn't hurt.  

> Enable client session management through http cookies in libcurl
> ----------------------------------------------------------------
>
>                 Key: AXIS2C-861
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-861
>             Project: Axis2-C
>          Issue Type: Improvement
>          Components: transport/http
>    Affects Versions: Current (Nightly)
>         Environment: Windows XP, Visual Studio 2005, libxml, libcurl
>            Reporter: Bill Mitchell
>             Fix For: Current (Nightly)
>
>         Attachments: libcurl.diff
>
>
> Many existing SOAP services maintain session context through HTTP cookies.  This can be seen in the prevalence of some mechanism to enable client cookies in various SOAP stacks, including the Axis versions in Java and C++.  Without re-implementing all of this in the Axis2C http transport, it would be easy and convenient to provide this support for Axis2C clients built with libcurl.  Libcurl already provides the underlying cookie support, all that is needed is some mechanism to enable/disable this support with, say, the defined but unused maintain_session option.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Commented: (AXIS2C-861) Enable client session management through http cookies in libcurl

Posted by "Dinesh Premalal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563909#action_12563909 ] 

Dinesh Premalal commented on AXIS2C-861:
----------------------------------------

Hi Bill, 
      I tried to commit this patch, but I couldn't. I think some line numbers are changed. If you could find some time please commit it.

> Enable client session management through http cookies in libcurl
> ----------------------------------------------------------------
>
>                 Key: AXIS2C-861
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-861
>             Project: Axis2-C
>          Issue Type: Improvement
>          Components: transport/http
>    Affects Versions: Current (Nightly)
>         Environment: Windows XP, Visual Studio 2005, libxml, libcurl
>            Reporter: Bill Mitchell
>         Attachments: libcurl_diff
>
>
> Many existing SOAP services maintain session context through HTTP cookies.  This can be seen in the prevalence of some mechanism to enable client cookies in various SOAP stacks, including the Axis versions in Java and C++.  Without re-implementing all of this in the Axis2C http transport, it would be easy and convenient to provide this support for Axis2C clients built with libcurl.  Libcurl already provides the underlying cookie support, all that is needed is some mechanism to enable/disable this support with, say, the defined but unused maintain_session option.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-861) Enable client session management through http cookies in libcurl

Posted by "Bill Mitchell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Mitchell updated AXIS2C-861:
---------------------------------

    Attachment: libcurl.diff

I am attaching a new libcurl.diff patch that merges all the changes for this issue and AXIS2C-830 with the changes already made to add http header support in AXIS2C-828.  This involved separating the release of read headers, which needs to happen on every request, from the release of the axis2_libcurl structure, that now persists throughout the session.  

If there are no objections, I will go ahead and commit these as soon as I finish resolving my svn setup/infrastructure issues.

> Enable client session management through http cookies in libcurl
> ----------------------------------------------------------------
>
>                 Key: AXIS2C-861
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-861
>             Project: Axis2-C
>          Issue Type: Improvement
>          Components: transport/http
>    Affects Versions: Current (Nightly)
>         Environment: Windows XP, Visual Studio 2005, libxml, libcurl
>            Reporter: Bill Mitchell
>         Attachments: libcurl.diff
>
>
> Many existing SOAP services maintain session context through HTTP cookies.  This can be seen in the prevalence of some mechanism to enable client cookies in various SOAP stacks, including the Axis versions in Java and C++.  Without re-implementing all of this in the Axis2C http transport, it would be easy and convenient to provide this support for Axis2C clients built with libcurl.  Libcurl already provides the underlying cookie support, all that is needed is some mechanism to enable/disable this support with, say, the defined but unused maintain_session option.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-861) Enable client session management through http cookies in libcurl

Posted by "Bill Mitchell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Mitchell updated AXIS2C-861:
---------------------------------

    Attachment:     (was: libcurl_diff)

> Enable client session management through http cookies in libcurl
> ----------------------------------------------------------------
>
>                 Key: AXIS2C-861
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-861
>             Project: Axis2-C
>          Issue Type: Improvement
>          Components: transport/http
>    Affects Versions: Current (Nightly)
>         Environment: Windows XP, Visual Studio 2005, libxml, libcurl
>            Reporter: Bill Mitchell
>         Attachments: libcurl.diff
>
>
> Many existing SOAP services maintain session context through HTTP cookies.  This can be seen in the prevalence of some mechanism to enable client cookies in various SOAP stacks, including the Axis versions in Java and C++.  Without re-implementing all of this in the Axis2C http transport, it would be easy and convenient to provide this support for Axis2C clients built with libcurl.  Libcurl already provides the underlying cookie support, all that is needed is some mechanism to enable/disable this support with, say, the defined but unused maintain_session option.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-861) Enable client session management through http cookies in libcurl

Posted by "Bill Mitchell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Mitchell updated AXIS2C-861:
---------------------------------

    Attachment: libcurl_diff

The attached diff file builds upon the changes suggested in AXIS2C-830, wherein are changes to make the libcurl interface multithreaded with a separate libcurl object for each http transport sender.  

Building on the changes there, enabling client session management through HTTP session cookies is fairly straightforward.  In the msg_ctx, we need to propagate the manage_session flag already made accessible to the client in the options.  Then in axis2_libcurl_send, we need to enable the curl cookie engine if manage_session is true, and then discard all cookies if manage_session later is set false.  

I've included the changes from AXIS2C-830 with these, to make it easier to integrate all at once, and to avoid the problem of the line numbers changing when one is integrated without the other.  The only incremental changes are to msg_ctx.c/.h and the code in axis2_libcurl.c to remember the cookie state in the curl structure and to call curl_easy_setopt as needed.  

Of course, a simple fix would be to enable cookie management all the time in the libcurl interface.  In fact, this has been how I have been accessing a service that requires cookies for several weeks now.  But since the Java and C++ implementations of Axis controlled this through the maintain_session option, it seems worthwhile to preserve the user control and enable or disable cookie management under the control of the manage_session option here.  


> Enable client session management through http cookies in libcurl
> ----------------------------------------------------------------
>
>                 Key: AXIS2C-861
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-861
>             Project: Axis2-C
>          Issue Type: Improvement
>          Components: transport/http
>    Affects Versions: Current (Nightly)
>         Environment: Windows XP, Visual Studio 2005, libxml, libcurl
>            Reporter: Bill Mitchell
>         Attachments: libcurl_diff
>
>
> Many existing SOAP services maintain session context through HTTP cookies.  This can be seen in the prevalence of some mechanism to enable client cookies in various SOAP stacks, including the Axis versions in Java and C++.  Without re-implementing all of this in the Axis2C http transport, it would be easy and convenient to provide this support for Axis2C clients built with libcurl.  Libcurl already provides the underlying cookie support, all that is needed is some mechanism to enable/disable this support with, say, the defined but unused maintain_session option.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org