Patchwork Keep authentication information after the first fail HTTP access (issue3567)

login
register
mail settings
Submitter Matt Mackall
Date Dec. 20, 2013, 9:07 p.m.
Message ID <1387573648.14932.100.camel@calx>
Download mbox | patch
Permalink /patch/3224/
State Superseded
Headers show

Comments

Matt Mackall - Dec. 20, 2013, 9:07 p.m.
On Fri, 2013-12-20 at 15:38 +0100, Stéphane Klein wrote:
> Le 20/12/13 15:33, Augie Fackler a écrit :
> > 
> > On Dec 20, 2013, at 9:30 AM, Stéphane Klein <sklein@bearstech.com
> > <mailto:sklein@bearstech.com>> wrote:
> > 
> >> I need to resend the full commit message in my patch ?
> > 
> > yes please
> 
> # HG changeset patch
> # User Stéphane Klein <contact@stephane-klein.info>
> # Date 1387547765 -3600
> #      Fri Dec 20 14:56:05 2013 +0100
> # Node ID b707db727d898921a486932559972d2d95af6901
> # Parent  04036798ebed0c6d7062517bb49b308a15e4345e
> http: reuse authentication info after the first failed request (issue3567)
> 
> Context : mercurial access to repository server with http access, and this
> server is protected by basic auth.

I'm seeing weird test failures here with 2.4, works fine with 2.6 and
2.7:

ERROR: /home/mpm/hg/tests/test-help.t output changed
!.s.............s...............
Stéphane Klein - Dec. 27, 2013, 10:59 a.m.
Le 20/12/13 22:07, Matt Mackall a écrit :
> On Fri, 2013-12-20 at 15:38 +0100, Stéphane Klein wrote:
>> Le 20/12/13 15:33, Augie Fackler a écrit :
>>>
>>> On Dec 20, 2013, at 9:30 AM, Stéphane Klein <sklein@bearstech.com
>>> <mailto:sklein@bearstech.com>> wrote:
>>>
>>>> I need to resend the full commit message in my patch ?
>>>
>>> yes please
>>
>> # HG changeset patch
>> # User Stéphane Klein <contact@stephane-klein.info>
>> # Date 1387547765 -3600
>> #      Fri Dec 20 14:56:05 2013 +0100
>> # Node ID b707db727d898921a486932559972d2d95af6901
>> # Parent  04036798ebed0c6d7062517bb49b308a15e4345e
>> http: reuse authentication info after the first failed request (issue3567)
>>
>> Context : mercurial access to repository server with http access, and this
>> server is protected by basic auth.
> 
> I'm seeing weird test failures here with 2.4, works fine with 2.6 and
> 2.7:
> 

Same without my patch, have one error with 2.4 :

https://gist.github.com/harobed/9659b3512ee0c146eac8
Augie Fackler - Dec. 27, 2013, 4:29 p.m.
On Dec 27, 2013, at 5:59 AM, Stéphane Klein <sklein@bearstech.com> wrote:

> Le 20/12/13 22:07, Matt Mackall a écrit :
>> On Fri, 2013-12-20 at 15:38 +0100, Stéphane Klein wrote:
>>> Le 20/12/13 15:33, Augie Fackler a écrit :
>>>> 
>>>> On Dec 20, 2013, at 9:30 AM, Stéphane Klein <sklein@bearstech.com
>>>> <mailto:sklein@bearstech.com>> wrote:
>>>> 
>>>>> I need to resend the full commit message in my patch ?
>>>> 
>>>> yes please
>>> 
>>> # HG changeset patch
>>> # User Stéphane Klein <contact@stephane-klein.info>
>>> # Date 1387547765 -3600
>>> #      Fri Dec 20 14:56:05 2013 +0100
>>> # Node ID b707db727d898921a486932559972d2d95af6901
>>> # Parent  04036798ebed0c6d7062517bb49b308a15e4345e
>>> http: reuse authentication info after the first failed request (issue3567)
>>> 
>>> Context : mercurial access to repository server with http access, and this
>>> server is protected by basic auth.
>> 
>> I'm seeing weird test failures here with 2.4, works fine with 2.6 and
>> 2.7:
>> 
> 
> Same without my patch, have one error with 2.4 :
> 
> https://gist.github.com/harobed/9659b3512ee0c146eac8

That looks like a color-related failure, probably something about TERMINFO settings on your machine. Are the failures the same with your patch?

Patch

--- /home/mpm/hg/tests/test-http.t 
+++ /home/mpm/hg/tests/test-http.t.err 
@@ -163,7 +163,8 @@ 
   abort: http authorization required
   [255]
   $ hg id http://user:pass@localhost:$HGPORT2/
-  5fed3813f7f5
+  abort: http authorization required
+  [255]
   $ echo '[auth]' >> .hg/hgrc
   $ echo 'l.schemes=http' >> .hg/hgrc
   $ echo 'l.prefix=lo' >> .hg/hgrc
@@ -176,18 +177,13 @@ 
   $ hg id http://user@localhost:$HGPORT2/
   5fed3813f7f5
   $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
-  streaming all changes
-  7 files to transfer, 916 bytes of data
-  transferred * bytes in * seconds (*/sec) (glob)
-  updating to branch default
-  5 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  abort: http authorization required
+  [255]
 
   $ hg id http://user2@localhost:$HGPORT2/
-  abort: http authorization required
-  [255]
+  5fed3813f7f5
   $ hg id http://user:pass2@localhost:$HGPORT2/
-  abort: HTTP Error 403: no
-  [255]
+  5fed3813f7f5
 
   $ cd ..