| xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> | 
|  | 2 | <info> | 
|  | 3 | <keywords> | 
|  | 4 | HTTP | 
|  | 5 | CURLOPT_CURLU | 
|  | 6 | </keywords> | 
|  | 7 | </info> | 
|  | 8 | # | 
|  | 9 | # Similar to 1518 but using CURLOPT_CURLU | 
|  | 10 | # | 
|  | 11 | # Server-side | 
|  | 12 | <reply> | 
|  | 13 | <data2 nocheck="yes"> | 
|  | 14 | HTTP/1.1 200 OK | 
|  | 15 | Date: Thu, 17 Mar 2016 14:41:00 GMT | 
|  | 16 | Server: test-server/fake | 
|  | 17 | X-Special: swsclose | 
|  | 18 | Content-Length: 0 | 
|  | 19 | Connection: close | 
|  | 20 |  | 
|  | 21 | </data2> | 
|  | 22 | <data nocheck="yes"> | 
|  | 23 | HTTP/1.1 302 redirect | 
|  | 24 | Date: Thu, 17 Mar 2016 14:41:00 GMT | 
|  | 25 | Server: test-server/fake | 
|  | 26 | Content-Type: text/plain; charset=US-ASCII | 
|  | 27 | Location: ../%TESTNUMBER0002 | 
|  | 28 | Content-Length: 0 | 
|  | 29 | Connection: close | 
|  | 30 |  | 
|  | 31 | </data> | 
|  | 32 | </reply> | 
|  | 33 |  | 
|  | 34 | # Client-side | 
|  | 35 | <client> | 
|  | 36 | <server> | 
|  | 37 | http | 
|  | 38 | </server> | 
|  | 39 | # tool is what to use instead of 'curl' | 
|  | 40 | <tool> | 
|  | 41 | lib%TESTNUMBER | 
|  | 42 | </tool> | 
|  | 43 |  | 
|  | 44 | <name> | 
|  | 45 | CURLOPT_CURLU, URL with space and CURLINFO_EFFECTIVE_URL | 
|  | 46 | </name> | 
|  | 47 | <command> | 
|  | 48 | "http://%HOSTIP:%HTTPPORT/ /with/ space/ /file" | 
|  | 49 | </command> | 
|  | 50 | </client> | 
|  | 51 |  | 
|  | 52 | # | 
|  | 53 | # Verify data after the test has been "shot" | 
|  | 54 | <verify> | 
|  | 55 | <protocol> | 
|  | 56 | GET /%20/with/%20space/%20/file HTTP/1.1 | 
|  | 57 | Host: %HOSTIP:%HTTPPORT | 
|  | 58 | Accept: */* | 
|  | 59 |  | 
|  | 60 | GET /%20/with/%20space/%TESTNUMBER0002 HTTP/1.1 | 
|  | 61 | Host: %HOSTIP:%HTTPPORT | 
|  | 62 | Accept: */* | 
|  | 63 |  | 
|  | 64 | </protocol> | 
|  | 65 | <stdout> | 
|  | 66 | res 0 | 
|  | 67 | status 200 | 
|  | 68 | redirects 1 | 
|  | 69 | effectiveurl http://%HOSTIP:%HTTPPORT/%20/with/%20space/%TESTNUMBER0002 | 
|  | 70 | redirecturl blank | 
|  | 71 | </stdout> | 
|  | 72 | <errorcode> | 
|  | 73 | 0 | 
|  | 74 | </errorcode> | 
|  | 75 | </verify> | 
|  | 76 | </testcase> |