test551 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <testcase>
  2. <info>
  3. # this test is meant to be exactly like 547 but using Digest instead of NTLM
  4. <keywords>
  5. HTTP
  6. HTTP POST
  7. POST callback
  8. HTTP proxy
  9. HTTP proxy Digest auth
  10. </keywords>
  11. </info>
  12. # Server-side
  13. <reply>
  14. # as a bonus, ww use an excessive nonce length
  15. <data>
  16. HTTP/1.1 407 Authorization Required swsclose
  17. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  18. Proxy-Authenticate: Digest realm="something fun to read", nonce="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
  19. Content-Type: text/html; charset=iso-8859-1
  20. Connection: close
  21. This is not the real page
  22. </data>
  23. # This is supposed to be returned when the server gets the Digest
  24. # Authorization: line passed-in from the client
  25. <data1000>
  26. HTTP/1.1 200 Things are fine in proxy land swsclose
  27. Server: Microsoft-IIS/5.0
  28. Content-Type: text/html; charset=iso-8859-1
  29. Content-Length: 42
  30. Contents of that page you requested, sir.
  31. </data1000>
  32. <datacheck>
  33. HTTP/1.1 407 Authorization Required swsclose
  34. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  35. Proxy-Authenticate: Digest realm="something fun to read", nonce="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
  36. Content-Type: text/html; charset=iso-8859-1
  37. Connection: close
  38. HTTP/1.1 200 Things are fine in proxy land swsclose
  39. Server: Microsoft-IIS/5.0
  40. Content-Type: text/html; charset=iso-8859-1
  41. Content-Length: 42
  42. Contents of that page you requested, sir.
  43. </datacheck>
  44. </reply>
  45. # Client-side
  46. <client>
  47. <server>
  48. http
  49. </server>
  50. # tool to use
  51. <tool>
  52. lib547
  53. </tool>
  54. <features>
  55. !SSPI
  56. crypto
  57. </features>
  58. <name>
  59. HTTP proxy auth Digest with POST data from read callback
  60. </name>
  61. <command>
  62. http://test.remote.example.com/path/551 http://%HOSTIP:%HTTPPORT s1lly:pers0n
  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. POST http://test.remote.example.com/path/551 HTTP/1.1
  72. Host: test.remote.example.com
  73. Accept: */*
  74. Proxy-Connection: Keep-Alive
  75. Content-Length: 36
  76. Content-Type: application/x-www-form-urlencoded
  77. this is the blurb we want to upload
  78. POST http://test.remote.example.com/path/551 HTTP/1.1
  79. Proxy-Authorization: Digest username="s1lly", realm="something fun to read", nonce="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", uri="/path/551", response="3325240726fbdaf1e61f3a0dd40b930c"
  80. Host: test.remote.example.com
  81. Accept: */*
  82. Proxy-Connection: Keep-Alive
  83. Content-Length: 36
  84. Content-Type: application/x-www-form-urlencoded
  85. this is the blurb we want to upload
  86. </protocol>
  87. </verify>
  88. </testcase>