Hi, All,
I'm building a oauth library with drakma, oauth specification need every request is signed with its token and token secret in additional-headers, but it also need a unique timestamp and nonce(a random string).
It is OK when there is not redirect, but http-request will use the same additional-headers in the redirect request, so oauth server throw an error: "Invalid nonce/timestamp: This nonce has been used ..."
I think there are two solutions, one is there is a option that http-request do not automatically follow redirect, the other is http-reqeust evaluate the additional-headers again when redirecting.
Is it acceptable, thank you in advance.
Plato Wu 片云天共远永夜月同孤
I just made a very similar change two days ago:
http://bknr.net/trac/changeset/4466/trunk/thirdparty/drakma
Could you provide a patch along the lines of what you think is needed?
See also here:
Thanks, Edi.
On Thu, Nov 12, 2009 at 3:05 AM, Xiangjun Wu netawater@gmail.com wrote:
Hi, All,
I'm building a oauth library with drakma, oauth specification need every request is signed with its token and token secret in additional-headers, but it also need a unique timestamp and nonce(a random string).
It is OK when there is not redirect, but http-request will use the same additional-headers in the redirect request, so oauth server throw an error: "Invalid nonce/timestamp: This nonce has been used ..."
I think there are two solutions, one is there is a option that http-request do not automatically follow redirect, the other is http-reqeust evaluate the additional-headers again when redirecting.
Is it acceptable, thank you in advance.
Plato Wu 片云天共远永夜月同孤
drakma-devel mailing list drakma-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel
OK, I have made a patch, Please check it.
Besides, launchpad.net need a new http method called patch, I also provide a patch, is it OK?
Best regards, Plato Wu
片云天共远永夜月同孤
On Thu, Nov 12, 2009 at 7:08 PM, Edi Weitz edi@agharta.de wrote:
I just made a very similar change two days ago:
http://bknr.net/trac/changeset/4466/trunk/thirdparty/drakma
Could you provide a patch along the lines of what you think is needed?
See also here:
Thanks, Edi.
On Thu, Nov 12, 2009 at 3:05 AM, Xiangjun Wu netawater@gmail.com wrote:
Hi, All,
I'm building a oauth library with drakma, oauth specification need every request is signed with its token and token secret in additional-headers, but it also need a unique timestamp and nonce(a
random
string).
It is OK when there is not redirect, but http-request will use the same additional-headers in the redirect request, so oauth server throw an
error:
"Invalid nonce/timestamp: This nonce has been used ..."
I think there are two solutions, one is there is a option that http-request do not automatically follow redirect, the other is http-reqeust evaluate the additional-headers again when redirecting.
Is it acceptable, thank you in advance.
Plato Wu 片云天共远永夜月同孤
drakma-devel mailing list drakma-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel
drakma-devel mailing list drakma-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel
On Fri, Nov 13, 2009 at 6:23 AM, Xiangjun Wu netawater@gmail.com wrote:
OK, I have made a patch, Please check it.
Besides, launchpad.net need a new http method called patch, I also provide a patch, is it OK?
Sorry for the delay. I've applied the patch for the new http method and cleaned it up afterwards because it contained TABs:
http://bknr.net/trac/changeset/4475/trunk/thirdparty/drakma http://bknr.net/trac/changeset/4476/trunk/thirdparty/drakma
In the other patch, I don't understand the docstring. I think this is not what you meant. And if you change the docstring, the HTML documentation also has to be updated.
Thanks, Edi.
Very sorry for TABs, I thought emacs have done for me, now I have configure .emacs correctly, thanks for pointing out.
The other patch add a type to parameters of additional-headers, it can be a function of no arguments and it will get evaluated in every request, so different request could send different parameters.
I am greatly embarrassed I do not write a fluent proper technological document in English that confuses you, Please guide me, thanks very much.
After we clear this issue, I will re-made a patch.
Best Wishes Plato Wu 片云天共远永夜月同孤
On Thu, Nov 26, 2009 at 1:29 AM, Edi Weitz edi@agharta.de wrote:
On Fri, Nov 13, 2009 at 6:23 AM, Xiangjun Wu netawater@gmail.com wrote:
OK, I have made a patch, Please check it.
Besides, launchpad.net need a new http method called patch, I also
provide a
patch, is it OK?
Sorry for the delay. I've applied the patch for the new http method and cleaned it up afterwards because it contained TABs:
http://bknr.net/trac/changeset/4475/trunk/thirdparty/drakma http://bknr.net/trac/changeset/4476/trunk/thirdparty/drakma
In the other patch, I don't understand the docstring. I think this is not what you meant. And if you change the docstring, the HTML documentation also has to be updated.
Thanks, Edi.
drakma-devel mailing list drakma-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel
I have remake the patch, Please check it, Thank you!.
片云天共远永夜月同孤
On Thu, Nov 26, 2009 at 11:04 AM, Xiangjun Wu netawater@gmail.com wrote:
Very sorry for TABs, I thought emacs have done for me, now I have configure .emacs correctly, thanks for pointing out.
The other patch add a type to parameters of additional-headers, it can be a function of no arguments and it will get evaluated in every request, so different request could send different parameters.
I am greatly embarrassed I do not write a fluent proper technological document in English that confuses you, Please guide me, thanks very much.
After we clear this issue, I will re-made a patch.
Best Wishes Plato Wu 片云天共远永夜月同孤
On Thu, Nov 26, 2009 at 1:29 AM, Edi Weitz edi@agharta.de wrote:
On Fri, Nov 13, 2009 at 6:23 AM, Xiangjun Wu netawater@gmail.com wrote:
OK, I have made a patch, Please check it.
Besides, launchpad.net need a new http method called patch, I also provide a patch, is it OK?
Sorry for the delay. I've applied the patch for the new http method and cleaned it up afterwards because it contained TABs:
http://bknr.net/trac/changeset/4475/trunk/thirdparty/drakma http://bknr.net/trac/changeset/4476/trunk/thirdparty/drakma
In the other patch, I don't understand the docstring. I think this is not what you meant. And if you change the docstring, the HTML documentation also has to be updated.
Thanks, Edi.
drakma-devel mailing list drakma-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel
I've now made the change you asked for:
http://bknr.net/trac/changeset/4480/trunk/thirdparty
Thanks, Edi.