test206 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP CONNECT
  7. HTTP proxy
  8. proxytunnel
  9. HTTP proxy Digest auth
  10. </keywords>
  11. </info>
  12. # Server-side
  13. <reply>
  14. <servercmd>
  15. connection-monitor
  16. auth_required
  17. </servercmd>
  18. # this is returned first since we get no proxy-auth
  19. <connect>
  20. HTTP/1.1 407 Authorization Required to proxy me my dear
  21. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  22. Content-Length: 33
  23. And you should ignore this data.
  24. </connect>
  25. # this is returned when we get a GET!
  26. <data2>
  27. HTTP/1.1 200 OK
  28. Date: Tue, 09 Nov 2010 14:49:00 GMT
  29. Content-Length: 7
  30. Connection: close
  31. Content-Type: text/html
  32. Funny-head: yesyes
  33. daniel
  34. </data2>
  35. # then this is returned when we get proxy-auth
  36. <connect1000>
  37. HTTP/1.1 200 OK swsbounce
  38. Server: no
  39. </connect1000>
  40. <datacheck>
  41. HTTP/1.1 407 Authorization Required to proxy me my dear
  42. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  43. Content-Length: 33
  44. HTTP/1.1 200 OK swsbounce
  45. Server: no
  46. HTTP/1.1 200 OK
  47. Date: Tue, 09 Nov 2010 14:49:00 GMT
  48. Content-Length: 7
  49. Connection: close
  50. Content-Type: text/html
  51. Funny-head: yesyes
  52. daniel
  53. </datacheck>
  54. </reply>
  55. # Client-side
  56. <client>
  57. <server>
  58. http
  59. </server>
  60. <features>
  61. !SSPI
  62. crypto
  63. proxy
  64. </features>
  65. <name>
  66. HTTP proxy CONNECT auth Digest
  67. </name>
  68. <command>
  69. http://test.remote.haxx.se.%TESTNUMBER:8990/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
  70. </command>
  71. </client>
  72. # Verify data after the test has been "shot"
  73. <verify>
  74. <protocol>
  75. CONNECT test.remote.haxx.se.%TESTNUMBER:8990 HTTP/1.1
  76. Host: test.remote.haxx.se.%TESTNUMBER:8990
  77. User-Agent: curl/%VERSION
  78. Proxy-Connection: Keep-Alive
  79. CONNECT test.remote.haxx.se.%TESTNUMBER:8990 HTTP/1.1
  80. Host: test.remote.haxx.se.%TESTNUMBER:8990
  81. Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.%TESTNUMBER:8990", response="003e36decb4dbf6366b3ecb9b87c24ec"
  82. User-Agent: curl/%VERSION
  83. Proxy-Connection: Keep-Alive
  84. GET /path/%TESTNUMBER0002 HTTP/1.1
  85. Host: test.remote.haxx.se.%TESTNUMBER:8990
  86. User-Agent: curl/%VERSION
  87. Accept: */*
  88. [DISCONNECT]
  89. </protocol>
  90. </verify>
  91. </testcase>