test239 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP proxy
  7. HTTP proxy NTLM auth
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. # this is returned first since we get no proxy-auth
  13. <data1001>
  14. HTTP/1.1 407 Authorization Required to proxy me my dear
  15. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  16. Content-Length: 34
  17. Hey you, authenticate or go away!
  18. </data1001>
  19. # This is supposed to be returned when the server gets the second
  20. # Authorization: NTLM line passed-in from the client
  21. <data1002>
  22. HTTP/1.1 200 Things are fine in proxy land swsclose
  23. Server: Microsoft-IIS/5.0
  24. Content-Type: text/html; charset=iso-8859-1
  25. Content-Length: 42
  26. Contents of that page you requested, sir.
  27. </data1002>
  28. <datacheck>
  29. HTTP/1.1 407 Authorization Required to proxy me my dear
  30. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  31. Content-Length: 34
  32. HTTP/1.1 200 Things are fine in proxy land swsclose
  33. Server: Microsoft-IIS/5.0
  34. Content-Type: text/html; charset=iso-8859-1
  35. Content-Length: 42
  36. Contents of that page you requested, sir.
  37. </datacheck>
  38. </reply>
  39. # Client-side
  40. <client>
  41. <server>
  42. http
  43. </server>
  44. <features>
  45. NTLM
  46. </features>
  47. <name>
  48. HTTP proxy-auth NTLM and then POST
  49. </name>
  50. <setenv>
  51. # we force our own host name, in order to make the test machine independent
  52. CURL_GETHOSTNAME=curlhost
  53. # we try to use the LD_PRELOAD hack, if not a debug build
  54. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  55. </setenv>
  56. <command>
  57. http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm -d "postit"
  58. </command>
  59. <precheck>
  60. chkhostname curlhost
  61. </precheck>
  62. </client>
  63. # Verify data after the test has been "shot"
  64. <verify>
  65. <strip>
  66. ^User-Agent: curl/.*
  67. </strip>
  68. <protocol nonewline="yes">
  69. POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
  70. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  71. User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
  72. Host: %HOSTIP:%HTTPPORT
  73. Accept: */*
  74. Proxy-Connection: Keep-Alive
  75. Content-Length: 0
  76. Content-Type: application/x-www-form-urlencoded
  77. POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
  78. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
  79. User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
  80. Host: %HOSTIP:%HTTPPORT
  81. Accept: */*
  82. Proxy-Connection: Keep-Alive
  83. Content-Length: 6
  84. Content-Type: application/x-www-form-urlencoded
  85. postit
  86. </protocol>
  87. </verify>
  88. </testcase>