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

推荐订阅源

WordPress大学
WordPress大学
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
月光博客
月光博客
V
Visual Studio Blog
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
Recorded Future
Recorded Future
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
SecWiki News
SecWiki News
博客园 - Franky
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
F
Full Disclosure
The Cloudflare Blog
Y
Y Combinator Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
S
Schneier on Security
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
L
LINUX DO - 热门话题
AI
AI
N
News and Events Feed by Topic
T
Tor Project blog
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog

博客园 - 张太国

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是否存在类似问题呢?答案是肯定的。解决方法上面已经说了。