test551 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. </features>
  56. <name>
  57. HTTP proxy auth Digest with POST data from read callback
  58. </name>
  59. <command>
  60. http://test.remote.example.com/path/551 http://%HOSTIP:%HTTPPORT s1lly:pers0n
  61. </command>
  62. </client>
  63. # Verify data after the test has been "shot"
  64. <verify>
  65. <strip>
  66. ^User-Agent: curl/.*
  67. </strip>
  68. <protocol>
  69. POST http://test.remote.example.com/path/551 HTTP/1.1
  70. Host: test.remote.example.com
  71. Accept: */*
  72. Proxy-Connection: Keep-Alive
  73. Content-Length: 36
  74. Content-Type: application/x-www-form-urlencoded
  75. this is the blurb we want to upload
  76. POST http://test.remote.example.com/path/551 HTTP/1.1
  77. Proxy-Authorization: Digest username="s1lly", realm="something fun to read", nonce="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", uri="/path/551", response="3325240726fbdaf1e61f3a0dd40b930c"
  78. Host: test.remote.example.com
  79. Accept: */*
  80. Proxy-Connection: Keep-Alive
  81. Content-Length: 36
  82. Content-Type: application/x-www-form-urlencoded
  83. this is the blurb we want to upload
  84. </protocol>
  85. </verify>
  86. </testcase>