test540 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. lib540
  55. </tool>
  56. <features>
  57. !SSPI
  58. crypto
  59. </features>
  60. <name>
  61. HTTP proxy auth Digest multi API re-using connection
  62. </name>
  63. <command>
  64. http://test.remote.example.com/path/540 http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
  65. </command>
  66. </client>
  67. # Verify data after the test has been "shot"
  68. <verify>
  69. <strip>
  70. ^User-Agent: curl/.*
  71. </strip>
  72. <protocol>
  73. GET http://test.remote.example.com/path/540 HTTP/1.1
  74. Host: custom.set.host.name
  75. Accept: */*
  76. Proxy-Connection: Keep-Alive
  77. GET http://test.remote.example.com/path/540 HTTP/1.1
  78. Host: custom.set.host.name
  79. Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"
  80. Accept: */*
  81. Proxy-Connection: Keep-Alive
  82. GET http://test.remote.example.com/path/540 HTTP/1.1
  83. Host: custom.set.host.name
  84. Accept: */*
  85. Proxy-Connection: Keep-Alive
  86. GET http://test.remote.example.com/path/540 HTTP/1.1
  87. Host: custom.set.host.name
  88. Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"
  89. Accept: */*
  90. Proxy-Connection: Keep-Alive
  91. [DISCONNECT]
  92. </protocol>
  93. </verify>
  94. </testcase>