logo       

bagder: curl/tests/data Makefile.am,1.206,1.207 test265,NONE,1.1: msg#00002

web.curl.cvs

Subject: bagder: curl/tests/data Makefile.am,1.206,1.207 test265,NONE,1.1

Update of /cvsroot/curl/curl/tests/data
In directory labb:/tmp/cvs-serv10325/tests/data

Modified Files:
Makefile.am
Added Files:
test265
Log Message:
Andrew Bushnell provided enough info for me to tell that we badly needed to
fix the CONNECT authentication code with multi-pass auth methods (such as
NTLM) as it didn't previously properly ignore response-bodies - in fact it
stopped reading after all response headers had been received. This could
lead to libcurl sending the next request and reading the body from the first
request as response to the second request. (I also renamed the function,
which wasn't strictly necessary but...)

The best fix would to once and for all make the CONNECT code use the
ordinary request sending/receiving code, treating it as any ordinary request
instead of the special-purpose function we have now. It should make it
better for multi-interface too. And possibly lead to less code...

Added test case 265 for this. It doesn't work as a _really_ good test case
since the test proxy is too stupid, but the test case helps when running the
debugger to verify.


Index: Makefile.am
===================================================================
RCS file: /cvsroot/curl/curl/tests/data/Makefile.am,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -d -r1.206 -r1.207
--- Makefile.am 22 Jun 2005 22:24:10 -0000 1.206
+++ Makefile.am 3 Jul 2005 22:25:15 -0000 1.207
@@ -32,4 +32,5 @@
test231 test232 test228 test229 test233 test234 test235 test236 test520 \
test237 test238 test239 test243 test245 test246 test247 test248 test249 \
test250 test251 test252 test253 test254 test255 test521 test522 test523 \
- test256 test257 test258 test259 test260 test261 test262 test263 test264
+ test256 test257 test258 test259 test260 test261 test262 test263 test264 \
+ test265

--- NEW FILE: test265 ---
# Server-side
<reply>

# this is returned first since we get no proxy-auth
<data1001>
HTTP/1.0 407 Authorization Required to proxy me my dear
Proxy-Authenticate: NTLM
TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAH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QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ!
QQQQQQQQQQQz
</data1001>

# This is supposed to be returned when the server gets the second
# Authorization: NTLM line passed-in from the client
<data1002>
HTTP/1.1 200 Things are fine in proxy land
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1

</data1002>

# this is returned when we get a GET!
<data2>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 7
Connection: close
Content-Type: text/html
Funny-head: yesyes

daniel
</data2>

# then this is returned when we get proxý-auth
<data1000>
HTTP/1.1 200 OK swsbounce
Server: no

Nice proxy auth sir!
</data1000>

<datacheck>
HTTP/1.0 407 Authorization Required to proxy me my dear
Proxy-Authenticate: NTLM
TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
Content-Length: 1033

HTTP/1.1 200 Things are fine in proxy land
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 7
Connection: close
Content-Type: text/html
Funny-head: yesyes

daniel
</datacheck>
</reply>

# Client-side
<client>
<server>
http
</server>
<features>
NTLM
</features>
<name>
HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407
</name>
<command>
http://test.remote.server.com:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT
--proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
</command>
</client>

# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent: curl/.*
</strip>
<protocol nonewline=yes>
CONNECT test.remote.server.com:265 HTTP/1.0
Host: test.remote.server.com:265
Proxy-Authorization: NTLM TlRMTVNTUAABAAAAAgIAAAAAAAAgAAAAAAAAACAAAAA=
Proxy-Connection: Keep-Alive

CONNECT test.remote.server.com:265 HTTP/1.0
Host: test.remote.server.com:265
Proxy-Authorization: NTLM
TlRMTVNTUAADAAAAGAAYAEUAAAAYABgAXQAAAAAAAABAAAAABQAFAEAAAAAAAAAARQAAAAAAAAB1AAAAAYIAAHNpbGx5oB5CPMq0JDu5tbxLow3sHn3jfoYDE+7QJVE7DA0GyDEwvj2BxsBctP9tT4fnCtL1
Proxy-Connection: Keep-Alive

POST /path/2650002 HTTP/1.1
User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS
OpenSSL/0.9.6b zlib/1.1.4
Host: test.remote.server.com:265
Accept: */*
Content-Length: 6
Content-Type: application/x-www-form-urlencoded

postit
</protocol>
</verify>

_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-commits



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise