test239 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP proxy
  7. HTTP proxy NTLM auth
  8. NTLM
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. # this is returned first since we get no proxy-auth
  14. <data1001>
  15. HTTP/1.1 407 Authorization Required to proxy me my dear
  16. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  17. Content-Length: 34
  18. Hey you, authenticate or go away!
  19. </data1001>
  20. # This is supposed to be returned when the server gets the second
  21. # Authorization: NTLM line passed-in from the client
  22. <data1002>
  23. HTTP/1.1 200 Things are fine in proxy land swsclose
  24. Server: Microsoft-IIS/5.0
  25. Content-Type: text/html; charset=iso-8859-1
  26. Content-Length: 42
  27. Contents of that page you requested, sir.
  28. </data1002>
  29. <datacheck>
  30. HTTP/1.1 407 Authorization Required to proxy me my dear
  31. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  32. Content-Length: 34
  33. HTTP/1.1 200 Things are fine in proxy land swsclose
  34. Server: Microsoft-IIS/5.0
  35. Content-Type: text/html; charset=iso-8859-1
  36. Content-Length: 42
  37. Contents of that page you requested, sir.
  38. </datacheck>
  39. </reply>
  40. # Client-side
  41. <client>
  42. <server>
  43. http
  44. </server>
  45. <features>
  46. NTLM
  47. SSL
  48. !SSPI
  49. proxy
  50. </features>
  51. <name>
  52. HTTP proxy-auth NTLM and then POST
  53. </name>
  54. <command>
  55. http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm -d "postit"
  56. </command>
  57. </client>
  58. # Verify data after the test has been "shot"
  59. <verify>
  60. <protocol nonewline="yes">
  61. POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
  62. Host: %HOSTIP:%HTTPPORT
  63. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  64. User-Agent: curl/%VERSION
  65. Accept: */*
  66. Proxy-Connection: Keep-Alive
  67. Content-Length: 0
  68. Content-Type: application/x-www-form-urlencoded
  69. POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
  70. Host: %HOSTIP:%HTTPPORT
  71. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
  72. User-Agent: curl/%VERSION
  73. Accept: */*
  74. Proxy-Connection: Keep-Alive
  75. Content-Length: 6
  76. Content-Type: application/x-www-form-urlencoded
  77. postit
  78. </protocol>
  79. </verify>
  80. </testcase>