curl-library
Re: How to provoke 407/401 in regerssion tests? (was: Re: Obtaining realm)
Date: Tue, 18 Nov 2008 19:13:39 +0100
On Mon, Nov 17, 2008 at 02:03:47PM -0800, Dan Fandrich wrote:
> On Mon, Nov 17, 2008 at 10:36:39PM +0100, Josef Wolf wrote:
> > Sorry for the late response. While the main patch seems to (mostly)
> > work, I got somewhat stuck with the regression test and I have not
> > found the time yet to dive deeply enough into the test architecture
> > to see how to integrate the new test. I just can't figure out how
> > to provoke 407/401 responses with retries from the test infrastructure.
>
> proxytunnel tests are odd in that the test number is given in the port
> number argument of the "remote" URL instead of within the URL itself.
> Instead of program arguments like:
>
> http://%HOSTIP:%HTTPSPORT/560 %HOSTIP:%HTTPPORT
>
> try something like:
>
> http://anything:560/ %HOSTIP:%HTTPPORT
Thanks for the hint Dan, but I still don't get it. I have put this in
the test description:
# tool is what to use instead of 'curl'
<tool>
lib560
</tool>
<command>
http://anything:560/ %HOSTIP:%HTTPPORT
</command>
the test case constructs this request header (for the proxy) from this:
CONNECT anything:560 HTTP/1.0
Host: anything:560
Proxy-Connection: Keep-Alive
Note that there's no proxy-credentials included (since I want to test
the 407 response here). So the proxy should respond with a 407.
Instead, I get this response:
HTTP/1.1 200 OK
Content-Length: 17
> Also note that there's a test 560 already--561 is still free if you hurry!
Yeah, at the time I started creating the test case, 560 was not existing.
I will keep updating, of course.
Received on 2008-11-18