* Trying 127.0.0.1... * Connected to www.test.co.kr (127.0.0.1) port 80 (#0) > GET /test.html HTTP/1.1 > User-Agent: curl/7.29.0 > Host: www.test.co.kr > Accept: */* > Accept-Encoding: gzip > < HTTP/1.1 302 Found < Date: Wed, 21 Sep 2022 08:20:31 GMT < Connection: close < Location: https://www.test.com/test.html < Content-Type: text/html < Content-Length: 140 < Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: <FILE>" to save to a file. * Failure writing output to destination * Closing connection 0
WEBTOB5.0.0.4
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to www.test.co.kr port 80 (#0) * Trying 127.0.0.1... * Connected to www.test.co.kr (127.0.0.1) port 80 (#0) > GET /test.html HTTP/1.1 > User-Agent: curl/7.29.0 > Host: www.test.co.kr > Accept: */* > Accept-Encoding: gzip > < HTTP/1.1 302 Found < Date: Wed, 21 Sep 2022 08:20:31 GMT < Connection: close < Location: https://www.test.com/test.html < Content-Type: text/html < Content-Length: 140 < { [data not shown] 100 140 100 140 0 0 9133 0 --:--:-- --:--:-- --:--:-- 10000 * Closing connection 0
- 특이사항 WebtoB4 compression은 브라우저에서 제공되는 것이기 때문에, curl에서는 압축을 풀수 없음. 위 Warning 메시지 표출됨. 다만, 아래와 같이 -o test.gz 설정을 추가하여 압축 파일로 형태로 내려 받을 수 있음.
curl -vk http://www.test.co.kr/test.html -H "Accept-Encoding: gzip" -o test.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:80... * Connected to www.test.co.kr (127.0.0.1) port 80 (#0) > GET /test.html HTTP/1.1 > Host: www.test.co.kr > User-Agent: curl/7.79.1 > Accept: */* > Accept-Encoding: gzip > * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Date: Tue, 20 Sep 2022 06:59:36 GMT < ETag: "0-1218-5aadf2dc" < Last-Modified: Sun, 18 Mar 2018 05:02:20 GMT < Accept-Ranges: bytes < Content-Type: text/html < Content-Encoding: gzip < Content-Length: 546