File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data / test1412
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Jun 3 10:01:16 2020 UTC (5 years ago) by misho
Branches: curl, MAIN
CVS tags: v7_70_0p4, HEAD
curl

    1: <testcase>
    2: <info>
    3: <keywords>
    4: HTTP
    5: HTTP GET
    6: HTTP Digest auth
    7: --anyauth
    8: </keywords>
    9: </info>
   10: 
   11: # Server-side
   12: <reply>
   13: <servercmd>
   14: auth_required
   15: </servercmd>
   16: <data>
   17: HTTP/1.1 401 Authorization Required swsclose
   18: Server: Apache/1.3.27 (Darwin) PHP/4.1.2
   19: WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
   20: WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
   21: WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
   22: Content-Type: text/html; charset=iso-8859-1
   23: Connection: close
   24: 
   25: This is not the real page
   26: </data>
   27: 
   28: # The second URL will get this response
   29: <data1>
   30: HTTP/1.1 401 Authorization Required swsclose
   31: Server: Apache/1.3.27 (Darwin) PHP/4.1.2
   32: WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
   33: WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
   34: WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
   35: Content-Type: text/html; charset=iso-8859-1
   36: Connection: close
   37: 
   38: This is not the real page
   39: </data1>
   40: 
   41: # This is supposed to be returned when the server gets a
   42: # Authorization: Digest line passed-in from the client
   43: <data1000>
   44: HTTP/1.1 200 OK swsclose
   45: Server: Apache/1.3.27 (Darwin) PHP/4.1.2
   46: Content-Type: text/html; charset=iso-8859-1
   47: Content-Length: 23
   48: Connection: close
   49: 
   50: This IS the real page!
   51: </data1000>
   52: 
   53: # This is the second request
   54: <data1001>
   55: HTTP/1.1 200 OK swsclose
   56: Server: Apache/1.3.27 (Darwin) PHP/4.1.2
   57: Content-Type: text/html; charset=iso-8859-1
   58: Content-Length: 23
   59: Connection: close
   60: 
   61: This IS the second real page!
   62: </data1001>
   63: 
   64: <datacheck>
   65: HTTP/1.1 401 Authorization Required swsclose
   66: Server: Apache/1.3.27 (Darwin) PHP/4.1.2
   67: WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
   68: WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
   69: WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
   70: Content-Type: text/html; charset=iso-8859-1
   71: Connection: close
   72: 
   73: HTTP/1.1 200 OK swsclose
   74: Server: Apache/1.3.27 (Darwin) PHP/4.1.2
   75: Content-Type: text/html; charset=iso-8859-1
   76: Content-Length: 23
   77: Connection: close
   78: 
   79: This IS the real page!
   80: </datacheck>
   81: 
   82: </reply>
   83: 
   84: # Client-side
   85: <client>
   86: <server>
   87: http
   88: </server>
   89: <features>
   90: !SSPI
   91: crypto
   92: </features>
   93:  <name>
   94: HTTP GET with --anyauth with two URLs (picking Digest) 
   95:  </name>
   96:  <command>
   97: http://%HOSTIP:%HTTPPORT/1412 -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/14120001
   98: </command>
   99: <file name="log/put1412">
  100: This is data we upload with PUT
  101: a second line
  102: line three
  103: four is the number of lines
  104: </file>
  105: </client>
  106: 
  107: # Verify data after the test has been "shot"
  108: <verify>
  109: <strip>
  110: ^User-Agent:.*
  111: </strip>
  112: <protocol>
  113: GET /1412 HTTP/1.1
  114: Host: %HOSTIP:%HTTPPORT
  115: Accept: */*
  116: 
  117: GET /1412 HTTP/1.1
  118: Host: %HOSTIP:%HTTPPORT
  119: Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1412", response="0390dbe89e31adca0413d11f91f30e7f"
  120: User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  121: Accept: */*
  122: 
  123: GET /14120001 HTTP/1.1
  124: Host: %HOSTIP:%HTTPPORT
  125: User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  126: Accept: */*
  127: 
  128: GET /14120001 HTTP/1.1
  129: Host: %HOSTIP:%HTTPPORT
  130: Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/14120001", response="0085df91870374c8bf4e94415e7fbf8e"
  131: User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  132: Accept: */*
  133: 
  134: </protocol>
  135: </verify>
  136: </testcase>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>