2
0

test206 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. # this is returned first since we get no proxy-auth
  15. <data>
  16. HTTP/1.1 407 Authorization Required to proxy me my dear
  17. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  18. And you should ignore this data.
  19. </data>
  20. # this is returned when we get a GET!
  21. <data2>
  22. HTTP/1.1 200 OK
  23. Date: Thu, 09 Nov 2010 14:49:00 GMT
  24. Content-Length: 7
  25. Connection: close
  26. Content-Type: text/html
  27. Funny-head: yesyes
  28. daniel
  29. </data2>
  30. # then this is returned when we get proxy-auth
  31. <data1000>
  32. HTTP/1.1 200 OK swsbounce
  33. Server: no
  34. Nice proxy auth sir!
  35. </data1000>
  36. <datacheck>
  37. HTTP/1.1 407 Authorization Required to proxy me my dear
  38. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  39. HTTP/1.1 200 OK swsbounce
  40. Server: no
  41. HTTP/1.1 200 OK
  42. Date: Thu, 09 Nov 2010 14:49:00 GMT
  43. Content-Length: 7
  44. Connection: close
  45. Content-Type: text/html
  46. Funny-head: yesyes
  47. daniel
  48. </datacheck>
  49. </reply>
  50. # Client-side
  51. <client>
  52. <server>
  53. http
  54. </server>
  55. <features>
  56. crypto
  57. </features>
  58. <name>
  59. HTTP proxy CONNECT auth Digest
  60. </name>
  61. <command>
  62. http://test.remote.haxx.se:206/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
  63. </command>
  64. </client>
  65. # Verify data after the test has been "shot"
  66. <verify>
  67. <strip>
  68. ^User-Agent: curl/.*
  69. </strip>
  70. <protocol>
  71. CONNECT test.remote.haxx.se:206 HTTP/1.1
  72. Host: test.remote.haxx.se:206
  73. Proxy-Connection: Keep-Alive
  74. CONNECT test.remote.haxx.se:206 HTTP/1.1
  75. Host: test.remote.haxx.se:206
  76. Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se:206", response="676e0836f3e1c5b31bf29770ef9d8224"
  77. Proxy-Connection: Keep-Alive
  78. GET /path/2060002 HTTP/1.1
  79. User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
  80. Host: test.remote.haxx.se:206
  81. Accept: */*
  82. </protocol>
  83. </verify>
  84. </testcase>