curl Protocol 'http not supported or disabled in libcurl

C:\Documents and Settings\ganiks.liu\Desktop\curl-7.37.0-win32\bin>curl -V
curl 7.37.0 (i386-pc-win32) libcurl/7.37.0 OpenSSL/1.0.1g zlib/1.2.8 WinIDN libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM SPNEGO SSL SSPI libz
C:\Documents and Settings\ganiks.liu\Desktop\curl-7.37.0-win32\bin>curl "http://baidu.com"
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>
C:\Documents and Settings\ganiks.liu\Desktop\curl-7.37.0-win32\bin>curl 'http://baidu.com'
curl: (1) Protocol 'http not supported or disabled in libcurl
C:\Documents and Settings\ganiks.liu\Desktop\curl-7.37.0-win32\bin>curl http://baidu.com
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>

好大一个坑,在 windowsXP 系统 CMD 中使用 curl, 不要对 URL 加引号或者单引号, 要加就加 双引号

上一篇:【转】Html.RenderPartial与 Html.RenderAction的区别


下一篇:libCURL动态分配buffer——节约内存