test540 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. HTTP proxy Digest auth
  8. multi
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <servercmd>
  14. connection-monitor
  15. </servercmd>
  16. # this is returned first since we get no proxy-auth
  17. <data>
  18. HTTP/1.1 407 Authorization Required to proxy me my dear
  19. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  20. Content-Length: 33
  21. And you should ignore this data.
  22. </data>
  23. # then this is returned when we get proxy-auth
  24. <data1000>
  25. HTTP/1.1 200 OK
  26. Content-Length: 21
  27. Server: no
  28. Nice proxy auth sir!
  29. </data1000>
  30. <datacheck>
  31. HTTP/1.1 407 Authorization Required to proxy me my dear
  32. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  33. Content-Length: 33
  34. HTTP/1.1 200 OK
  35. Content-Length: 21
  36. Server: no
  37. Nice proxy auth sir!
  38. HTTP/1.1 407 Authorization Required to proxy me my dear
  39. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  40. Content-Length: 33
  41. HTTP/1.1 200 OK
  42. Content-Length: 21
  43. Server: no
  44. Nice proxy auth sir!
  45. </datacheck>
  46. </reply>
  47. # Client-side
  48. <client>
  49. <server>
  50. http
  51. </server>
  52. # tool is what to use instead of 'curl'
  53. <tool>
  54. lib%TESTNUMBER
  55. </tool>
  56. <features>
  57. !SSPI
  58. crypto
  59. proxy
  60. </features>
  61. <name>
  62. HTTP proxy auth Digest multi API re-using connection
  63. </name>
  64. <command>
  65. http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
  66. </command>
  67. </client>
  68. # Verify data after the test has been "shot"
  69. <verify>
  70. <protocol>
  71. GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
  72. Host: custom.set.host.name
  73. Accept: */*
  74. Proxy-Connection: Keep-Alive
  75. GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
  76. Host: custom.set.host.name
  77. Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/%TESTNUMBER", response="ca507dcf189196b6a5374d3233042261"
  78. Accept: */*
  79. Proxy-Connection: Keep-Alive
  80. GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
  81. Host: custom.set.host.name
  82. Accept: */*
  83. Proxy-Connection: Keep-Alive
  84. GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
  85. Host: custom.set.host.name
  86. Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/%TESTNUMBER", response="ca507dcf189196b6a5374d3233042261"
  87. Accept: */*
  88. Proxy-Connection: Keep-Alive
  89. [DISCONNECT]
  90. </protocol>
  91. </verify>
  92. </testcase>