test432 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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="%LOGDIR/config%TESTNUMBER">
  36. --next
  37. url = %HOSTIP:%HTTPPORT/%TESTNUMBER0001
  38. header = "a: a"
  39. data = "a"
  40. --next
  41. url = %HOSTIP:%HTTPPORT/%TESTNUMBER0002
  42. header = "b: b"
  43. data = "b"
  44. config = "%LOGDIR/config%TESTNUMBER-c"
  45. </file1>
  46. <file2 name="%LOGDIR/config%TESTNUMBER-c">
  47. --next
  48. url = %HOSTIP:%HTTPPORT/%TESTNUMBER0003
  49. header = "c: c"
  50. data = "c"
  51. </file2>
  52. <server>
  53. http
  54. </server>
  55. <name>
  56. Use -K with --next and --config from within
  57. </name>
  58. <command>
  59. -K %LOGDIR/config%TESTNUMBER
  60. </command>
  61. </client>
  62. #
  63. # Verify data after the test has been "shot"
  64. <verify>
  65. <protocol nonewline="yes">
  66. POST /%TESTNUMBER0001 HTTP/1.1
  67. Host: %HOSTIP:%HTTPPORT
  68. User-Agent: curl/%VERSION
  69. Accept: */*
  70. a: a
  71. Content-Length: 1
  72. Content-Type: application/x-www-form-urlencoded
  73. aPOST /%TESTNUMBER0002 HTTP/1.1
  74. Host: %HOSTIP:%HTTPPORT
  75. User-Agent: curl/%VERSION
  76. Accept: */*
  77. b: b
  78. Content-Length: 1
  79. Content-Type: application/x-www-form-urlencoded
  80. bPOST /%TESTNUMBER0003 HTTP/1.1
  81. Host: %HOSTIP:%HTTPPORT
  82. User-Agent: curl/%VERSION
  83. Accept: */*
  84. c: c
  85. Content-Length: 1
  86. Content-Type: application/x-www-form-urlencoded
  87. c
  88. </protocol>
  89. </verify>
  90. </testcase>