test4 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP added headers
  7. HTTP replaced headers
  8. </keywords>
  9. </info>
  10. #
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.1 200 OK
  15. Date: Tue, 09 Nov 2010 14:49:00 GMT
  16. Server: test-server/fake swsclose
  17. Content-Type: text/html
  18. Funny-head: yesyes
  19. </data>
  20. </reply>
  21. #
  22. # Client-side
  23. <client>
  24. <server>
  25. http
  26. </server>
  27. <name>
  28. Replaced internal and added custom HTTP headers
  29. </name>
  30. <command>
  31. -H "extra-header: here" -H "Accept: replaced" -H "X-Custom-Header;" -H "X-Test: foo; " -H "X-Test:" -H "X-Test2: foo;" -H "X-Test3: " -H "X-Test4; " -H "X-Test5;ignored" http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER
  32. </command>
  33. </client>
  34. #
  35. # Verify data after the test has been "shot"
  36. <verify>
  37. <protocol>
  38. GET /%TESTNUMBER HTTP/1.1
  39. Host: %HOSTIP:%HTTPPORT
  40. User-Agent: curl/%VERSION
  41. extra-header: here
  42. Accept: replaced
  43. X-Custom-Header:
  44. X-Test: foo;
  45. X-Test2: foo;
  46. GET /%TESTNUMBER HTTP/1.1
  47. Host: %HOSTIP:%HTTPPORT
  48. User-Agent: curl/%VERSION
  49. extra-header: here
  50. Accept: replaced
  51. X-Custom-Header:
  52. X-Test: foo;
  53. X-Test2: foo;
  54. </protocol>
  55. </verify>
  56. </testcase>