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). Corre

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

2013-06-18 Thread Brandon Casey
On Tue, Jun 18, 2013 at 3:13 PM, Jeff King wrote: > On Tue, Jun 18, 2013 at 12:29:03PM -0700, Brandon Casey wrote: >> > It could be a problem when we have multiple handles in play >> > simultaneously (we invalidate the pointer that another simultaneous >> > handle is using, but do not immediately

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

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 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 understanding o

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

2013-06-18 Thread Junio C Hamano
Daniel Stenberg 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 "unsubscribe git" in

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

2013-06-17 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 required

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 cu

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 wrote: > From: Brandon Casey > > 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 th

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

2013-06-17 Thread Brandon Casey
From: Brandon Casey 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 overwriting the strbuf w