test1245 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <testcase>
  2. <info>
  3. <keywords>
  4. FTP
  5. HTTP
  6. HTTP GET
  7. --proto
  8. --proto-redir
  9. followlocation
  10. </keywords>
  11. </info>
  12. #
  13. # Server-side
  14. <reply>
  15. <data>
  16. HTTP/1.1 301 OK swsclose
  17. Date: Thu, 09 Nov 2010 14:49:00 GMT
  18. Server: test-server/fake
  19. Content-Length: 0
  20. Location: ftp://127.0.0.1:8992/1245
  21. Connection: close
  22. </data>
  23. </reply>
  24. #
  25. # Client-side
  26. <client>
  27. <server>
  28. http
  29. ftp
  30. </server>
  31. <name>
  32. --proto deny must override --proto-redir allow
  33. </name>
  34. <command>
  35. --location --proto +all,-ftp --proto-redir -all,+ftp http://%HOSTIP:%HTTPPORT/1245
  36. </command>
  37. # The data section doesn't do variable substitution, so we must assert this
  38. <precheck>
  39. perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%FTPPORT' ne '8992' );"
  40. </precheck>
  41. </client>
  42. #
  43. # Verify data after the test has been "shot"
  44. <verify>
  45. <strip>
  46. ^User-Agent:.*
  47. </strip>
  48. <protocol>
  49. GET /1245 HTTP/1.1
  50. Host: %HOSTIP:%HTTPPORT
  51. Accept: */*
  52. </protocol>
  53. # 1 - Protocol ftp not supported or disabled in libcurl
  54. <errorcode>
  55. 1
  56. </errorcode>
  57. </verify>
  58. </testcase>