惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
Lohrmann on Cybersecurity
S
Secure Thoughts
I
Intezer
Forbes - Security
Forbes - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
H
Help Net Security
IT之家
IT之家
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
宝玉的分享
宝玉的分享
S
Securelist
T
The Exploit Database - CXSecurity.com
博客园 - 叶小钗
Security Latest
Security Latest
The Cloudflare Blog
Jina AI
Jina AI
T
Tenable Blog
J
Java Code Geeks
G
GRAHAM CLULEY
C
CERT Recently Published Vulnerability Notes
SecWiki News
SecWiki News
AI
AI
博客园 - 聂微东
S
Schneier on Security
博客园_首页
爱范儿
爱范儿
有赞技术团队
有赞技术团队
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 【当耐特】
T
Threatpost
Security Archives - TechRepublic
Security Archives - TechRepublic
Help Net Security
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Announcements
Recent Announcements
W
WeLiveSecurity
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
S
Security Affairs
T
Tor Project blog
T
Tailwind CSS Blog
N
News | PayPal Newsroom
C
CXSECURITY Database RSS Feed - CXSecurity.com
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
The Register - Security
The Register - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security

博客园 - 张太国

AI到底给我们带来什么? 好日子一去不复返 码农如何写好一封邮件/3 码农如何写好一封邮件/2 码农如何写好一封邮件/1 码农如何写好一封邮件/0 深入浅出Tomcat/4 - Tomcat容器 深入浅出Tomcat/3 - Tomcat生命周期 深入浅出Tomcat系列 深入浅出Tomcat/2 - Tomcat启动和停止 深入浅出Tomcat/1- 来历和配置文件 深入浅出:HTTP/2 深入浅出:5G和HTTP 深入浅出:远离法律风险,必须了解开源项目许可证 深入浅出经典面试题:从浏览器中输入URL到页面加载发生了什么 - Part 3 深入浅出经典面试题:从浏览器中输入URL到页面加载发生了什么 - Part 2 深入浅出经典面试题:从浏览器中输入URL到页面加载发生了什么 - Part 1 一个微信群的现状 Windows Mobile开发启动模拟器时,得到错误 0x80070070: There is not enough space on the disk
C/C++实现HTTP/HTTPS的POST存在的问题
张太国 · 2009-05-04 · via 博客园 - 张太国

用微软的那套东西确实很令人不爽,写个HTTP/HTTPS POST小功能都令人抓狂。

连接,发送,关闭就这么简单。

发送时使用了API  HttpSendRequest,但是这个方法的body(即第4个参数必须为multi-char),所以您现在正在使用Unicode,那么必须现将之转化为multi-char

如果不转化有什么后果?结果是post的数据不完整。而且post data仅仅只有一个字母。

很可惜的是,MSDN关于该API没有解释清楚。这样会令人不知其原因。

继续思考一下,MFC其实封装了底层API,那么CHTTPFile的SendRequest是否存在类似问题呢?答案是肯定的。解决方法上面已经说了。