113498266Sopenharmony_ci<testcase> 213498266Sopenharmony_ci<info> 313498266Sopenharmony_ci<keywords> 413498266Sopenharmony_ciHTTP 513498266Sopenharmony_ciHTTP PUT 613498266Sopenharmony_cifollowlocation 713498266Sopenharmony_ci</keywords> 813498266Sopenharmony_ci 913498266Sopenharmony_ci</info> 1013498266Sopenharmony_ci# Server-side 1113498266Sopenharmony_ci<reply> 1213498266Sopenharmony_ci<data> 1313498266Sopenharmony_ciHTTP/1.1 301 Redirect swsclose 1413498266Sopenharmony_ciDate: Thu, 29 Jul 2008 14:49:00 GMT 1513498266Sopenharmony_ciServer: test-server/fake 1613498266Sopenharmony_ciLocation: data/%TESTNUMBER0002.txt?coolsite=yes 1713498266Sopenharmony_ciContent-Length: 0 1813498266Sopenharmony_ciConnection: close 1913498266Sopenharmony_ci 2013498266Sopenharmony_ci</data> 2113498266Sopenharmony_ci<data2> 2213498266Sopenharmony_ciHTTP/1.1 100 Continue 2313498266Sopenharmony_ci 2413498266Sopenharmony_ciHTTP/1.1 200 Followed here fine swsclose 2513498266Sopenharmony_ciDate: Thu, 29 Jul 2008 14:49:00 GMT 2613498266Sopenharmony_ciServer: test-server/fake 2713498266Sopenharmony_ciContent-Length: 51 2813498266Sopenharmony_ci 2913498266Sopenharmony_ciIf this is received, the location following worked 3013498266Sopenharmony_ci</data2> 3113498266Sopenharmony_ci<datacheck> 3213498266Sopenharmony_ciHTTP/1.1 301 Redirect swsclose 3313498266Sopenharmony_ciDate: Thu, 29 Jul 2008 14:49:00 GMT 3413498266Sopenharmony_ciServer: test-server/fake 3513498266Sopenharmony_ciLocation: data/%TESTNUMBER0002.txt?coolsite=yes 3613498266Sopenharmony_ciContent-Length: 0 3713498266Sopenharmony_ciConnection: close 3813498266Sopenharmony_ci 3913498266Sopenharmony_ciHTTP/1.1 100 Continue 4013498266Sopenharmony_ci 4113498266Sopenharmony_ciHTTP/1.1 200 Followed here fine swsclose 4213498266Sopenharmony_ciDate: Thu, 29 Jul 2008 14:49:00 GMT 4313498266Sopenharmony_ciServer: test-server/fake 4413498266Sopenharmony_ciContent-Length: 51 4513498266Sopenharmony_ci 4613498266Sopenharmony_ciIf this is received, the location following worked 4713498266Sopenharmony_ci</datacheck> 4813498266Sopenharmony_ci</reply> 4913498266Sopenharmony_ci 5013498266Sopenharmony_ci# Client-side 5113498266Sopenharmony_ci<client> 5213498266Sopenharmony_ci<server> 5313498266Sopenharmony_cihttp 5413498266Sopenharmony_ci</server> 5513498266Sopenharmony_ci<name> 5613498266Sopenharmony_ciHTTP PUT with Location: following 5713498266Sopenharmony_ci</name> 5813498266Sopenharmony_ci<command> 5913498266Sopenharmony_cihttp://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -T %LOGDIR/test%TESTNUMBER.txt 6013498266Sopenharmony_ci</command> 6113498266Sopenharmony_ci<file name="%LOGDIR/test%TESTNUMBER.txt"> 6213498266Sopenharmony_ciWeird 6313498266Sopenharmony_ci file 6413498266Sopenharmony_ci to 6513498266Sopenharmony_ci upload 6613498266Sopenharmony_cifor 6713498266Sopenharmony_ci testing 6813498266Sopenharmony_cithe 6913498266Sopenharmony_ci PUT 7013498266Sopenharmony_ci feature 7113498266Sopenharmony_ci</file> 7213498266Sopenharmony_ci</client> 7313498266Sopenharmony_ci 7413498266Sopenharmony_ci# Verify data after the test has been "shot" 7513498266Sopenharmony_ci<verify> 7613498266Sopenharmony_ci 7713498266Sopenharmony_ci# The primary reason libcurl sends the data part twice in this test is that 7813498266Sopenharmony_ci# the test HTTP server is blocking until it has read the entire request, 7913498266Sopenharmony_ci# including the full request-body before it responds. So in this test the 8013498266Sopenharmony_ci# server says 301 and 100 _after_ the entire PUT body has been sent. 8113498266Sopenharmony_ci 8213498266Sopenharmony_ci<protocol> 8313498266Sopenharmony_ciPUT /want/%TESTNUMBER HTTP/1.1 8413498266Sopenharmony_ciHost: %HOSTIP:%HTTPPORT 8513498266Sopenharmony_ciUser-Agent: curl/%VERSION 8613498266Sopenharmony_ciAccept: */* 8713498266Sopenharmony_ciContent-Length: 78 8813498266Sopenharmony_ci 8913498266Sopenharmony_ciWeird 9013498266Sopenharmony_ci file 9113498266Sopenharmony_ci to 9213498266Sopenharmony_ci upload 9313498266Sopenharmony_cifor 9413498266Sopenharmony_ci testing 9513498266Sopenharmony_cithe 9613498266Sopenharmony_ci PUT 9713498266Sopenharmony_ci feature 9813498266Sopenharmony_ciPUT /want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1 9913498266Sopenharmony_ciHost: %HOSTIP:%HTTPPORT 10013498266Sopenharmony_ciUser-Agent: curl/%VERSION 10113498266Sopenharmony_ciAccept: */* 10213498266Sopenharmony_ciContent-Length: 78 10313498266Sopenharmony_ci 10413498266Sopenharmony_ciWeird 10513498266Sopenharmony_ci file 10613498266Sopenharmony_ci to 10713498266Sopenharmony_ci upload 10813498266Sopenharmony_cifor 10913498266Sopenharmony_ci testing 11013498266Sopenharmony_cithe 11113498266Sopenharmony_ci PUT 11213498266Sopenharmony_ci feature 11313498266Sopenharmony_ci</protocol> 11413498266Sopenharmony_ci</verify> 11513498266Sopenharmony_ci</testcase> 116