test431 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <testcase>
  2. # Derived from on https://github.com/curl/curl/issues/5120
  3. <info>
  4. <keywords>
  5. --next
  6. --config
  7. POST
  8. </keywords>
  9. </info>
  10. #
  11. # Server-side
  12. <reply>
  13. <data1>
  14. HTTP/1.1 200 OK
  15. Content-Length: 6
  16. Content-Type: text/1
  17. -foo-
  18. </data1>
  19. <data2>
  20. HTTP/1.1 200 OK
  21. Content-Length: 6
  22. Content-Type: text/2
  23. -foo-
  24. </data2>
  25. <data3>
  26. HTTP/1.1 200 OK
  27. Content-Length: 6
  28. Content-Type: text/3
  29. -foo-
  30. </data3>
  31. </reply>
  32. #
  33. # Client-side
  34. <client>
  35. <file1 name="log/config%TESTNUMBER-a">
  36. --next
  37. url = %HOSTIP:%HTTPPORT/%TESTNUMBER0001
  38. header = "a: a"
  39. data = "a"
  40. </file1>
  41. <file2 name="log/config%TESTNUMBER-b">
  42. --next
  43. url = %HOSTIP:%HTTPPORT/%TESTNUMBER0002
  44. header = "b: b"
  45. data = "b"
  46. </file2>
  47. <server>
  48. http
  49. </server>
  50. <name>
  51. Two -K uses with --next and then one on cmdline
  52. </name>
  53. <command>
  54. -K log/config%TESTNUMBER-a -K log/config%TESTNUMBER-b --next -d c %HOSTIP:%HTTPPORT/%TESTNUMBER0003 -H "c: c"
  55. </command>
  56. </client>
  57. #
  58. # Verify data after the test has been "shot"
  59. <verify>
  60. <protocol nonewline="yes">
  61. POST /%TESTNUMBER0001 HTTP/1.1
  62. Host: %HOSTIP:%HTTPPORT
  63. User-Agent: curl/%VERSION
  64. Accept: */*
  65. a: a
  66. Content-Length: 1
  67. Content-Type: application/x-www-form-urlencoded
  68. aPOST /%TESTNUMBER0002 HTTP/1.1
  69. Host: %HOSTIP:%HTTPPORT
  70. User-Agent: curl/%VERSION
  71. Accept: */*
  72. b: b
  73. Content-Length: 1
  74. Content-Type: application/x-www-form-urlencoded
  75. bPOST /%TESTNUMBER0003 HTTP/1.1
  76. Host: %HOSTIP:%HTTPPORT
  77. User-Agent: curl/%VERSION
  78. Accept: */*
  79. c: c
  80. Content-Length: 1
  81. Content-Type: application/x-www-form-urlencoded
  82. c
  83. </protocol>
  84. </verify>
  85. </testcase>