test206 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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: Thu, 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: Thu, 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. crypto
  62. </features>
  63. <name>
  64. HTTP proxy CONNECT auth Digest
  65. </name>
  66. <command>
  67. http://test.remote.haxx.se.206:8990/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
  68. </command>
  69. </client>
  70. # Verify data after the test has been "shot"
  71. <verify>
  72. <strip>
  73. ^User-Agent: curl/.*
  74. </strip>
  75. <protocol>
  76. CONNECT test.remote.haxx.se.206:8990 HTTP/1.1
  77. Host: test.remote.haxx.se.206:8990
  78. Proxy-Connection: Keep-Alive
  79. CONNECT test.remote.haxx.se.206:8990 HTTP/1.1
  80. Host: test.remote.haxx.se.206:8990
  81. Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.206:8990", response="003e36decb4dbf6366b3ecb9b87c24ec"
  82. Proxy-Connection: Keep-Alive
  83. GET /path/2060002 HTTP/1.1
  84. User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
  85. Host: test.remote.haxx.se.206:8990
  86. Accept: */*
  87. [DISCONNECT]
  88. </protocol>
  89. </verify>
  90. </testcase>