xanarry / http-downloader Goto Github PK
View Code? Open in Web Editor NEW这是一个用C语言编写Linux平台的http文件下载器, 以命令行的方式运行
这是一个用C语言编写Linux平台的http文件下载器, 以命令行的方式运行
Hi:
我在使用该例程时出现请求失败,一直返回HTTP/1.1 400 Bad Request
我的测试url也是用的例程中提供的,两个都一样。但是我直接把url复制到浏览器又是正常的。
麻烦指导一下,谢谢。如下是测试log。
msh /data>wgets http://nodejs.org/dist/v4.2.3/node-v4.2.3-linux-x64.tar.gz
1: Parsing url...
start:7
url:http://nodejs.org/dist/v4.2.3/node-v4.2.3-linux-x64.tar.gz
newurl:dist/v4.2.3/node-v4.2.3-linux-x64.tar.gz
url:http://nodejs.org/dist/v4.2.3/node-v4.2.3-linux-x64.tar.gz
newurl:dist/v4.2.3/node-v4.2.3-linux-x64.tar.gz
2: Get ip address...
domain:nodejs.org
Detail<<<<
URL: dist/v4.2.3/node-v4.2.3-linux-x64.tar.gz
DOMAIN: nodejs.org
IP: 104.20.23.46
PORT: 80
FILENAME: node-v4.2.3-linux-x64.tar.gz
GET dist/v4.2.3/node-v4.2.3-linux-x64.tar.gz HTTP/1.1
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537(KHTML, like Gecko) Chrome/47.0.2526Safari/537.36
Host:nodejs.org
Connection:close
285
3: Connect server...
4: Send request...
Response header:<<<<
HTTP/1.1 400 Bad Request
Server: cloudflare
Date: Tue, 03 Nov 2020 02:55:39 GMT
Content-Type: text/html
Content-Length: 155
Connection: close
CF-RAY: -
5: Start thread to download...
rtos_file_name: /data/node-v4.2.3-linux-x64.tar.gz ^_^
100.00% [==================================================] 0.00/0.00MB
Download 100.00%
Download successful ^_^
msh /data>
msh /data>ls -l
-rwxrwxrwx root root 1970-01-01 00:00:00 0000000067B nelumbo_nucifera-009.jpg
-rwxrwxrwx root root 1970-01-01 00:00:00 0000000155B node-v4.2.3-linux-x64.tar.gz
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.