Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-19 Thread Daniel Stenberg
On Tue, 18 Jun 2013, Jeff King wrote: But, I don't know if there is any multi-processing happening within the curl library. I don't think curl does any threading; when we are not inside curl_*_perform, there is no curl code running at all (Daniel can correct me if I'm wrong on that).

Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-18 Thread Daniel Stenberg
On Tue, 18 Jun 2013, Jeff King wrote: TL;DR: I'm just confirming what's said here! =) My understanding of curl's pointer requirements are: 1. Older versions of curl (and I do not recall which version off-hand, but it is not important) stored just the pointer. Calling code was

Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-18 Thread Junio C Hamano
Daniel Stenberg dan...@haxx.se writes: On Tue, 18 Jun 2013, Jeff King wrote: TL;DR: I'm just confirming what's said here! =) Thanks. We are very fortunate to have you as the cURL guru who gives prompt responses and sanity checks to us. -- To unsubscribe from this list: send the line

Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-18 Thread Brandon Casey
On Mon, Jun 17, 2013 at 10:19 PM, Jeff King p...@peff.net wrote: On Mon, Jun 17, 2013 at 07:00:40PM -0700, Brandon Casey wrote: Curl requires that we manage any strings that we pass to it as pointers. So, we should not be overwriting this strbuf after we've passed it to curl. My

Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-18 Thread Jeff King
On Tue, Jun 18, 2013 at 12:29:03PM -0700, Brandon Casey wrote: 1. Older versions of curl (and I do not recall which version off-hand, but it is not important) stored just the pointer. Calling code was required to manage the string lifetime itself. Daniel mentions that the

[PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-17 Thread Brandon Casey
From: Brandon Casey draf...@gmail.com Curl requires that we manage any strings that we pass to it as pointers. So, we should not be overwriting this strbuf after we've passed it to curl. Additionally, it is unnecessary since we only prompt for the user name and password once, so we end up

Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-17 Thread Eric Sunshine
On Mon, Jun 17, 2013 at 10:00 PM, Brandon Casey bca...@nvidia.com wrote: From: Brandon Casey draf...@gmail.com Curl requires that we manage any strings that we pass to it as pointers. So, we should not be overwriting this strbuf after we've passed it to curl. Additionally, it is unnecessary

Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-17 Thread Jeff King
On Mon, Jun 17, 2013 at 07:00:40PM -0700, Brandon Casey wrote: Curl requires that we manage any strings that we pass to it as pointers. So, we should not be overwriting this strbuf after we've passed it to curl. My understanding of curl's pointer requirements are: 1. Older versions of curl