HTTP 1.1支持只发送header信息(不带任何body信息),如果服务器认为客户端有权限请求服务器,则返回100,否则返回401。客户端如果接受到100,才开始把请求body发送到服务器。

这样当服务器返回401的时候,客户端就可以不用发送请求body了,节约了带宽。

另外HTTP还支持传送内容的一部分。这样当客户端已经有一部分的资源后,只需要跟服务器请求另外的部分资源即可。这是支持文件断点续传的基础。
---------------------
作者:Sam哥哥
来源:CSDN
原文:https://blog.csdn.net/linsongbin1/article/details/54980801
版权声明:本文为博主原创文章,转载请附上博文链接!

If you are doing a POST, and the content length is 1,025 or greater, then curl exploits a feature of http 1.1: 100 (Continue) Status.

See http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3

* it adds a header, "Expect: 100-continue". 
* it then sends the request head, waits for a 100 response code, then sends the content

Not
all web servers support this though.  Various errors are returned
depending on the server.  If this happens to you, suppress the "Expect"
header with this command:

<?php
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
?>

http://www.php.net/manual/zh/function.curl-setopt.php#82418

最新文章

  1. IOS自定义表格UITableViewCell
  2. Haproxy ssl 配置方式
  3. 类型检测汇总!typeof 和 instanceof 和isArray
  4. 大型分布式C++框架《三:序列化与反序列化》
  5. 加密芯片ALPU
  6. Java的进程内缓存框架:EhCache (转)
  7. white-space详解
  8. vue2.0 通过v-html指令渲染的富文本无法修改样式的解决方案
  9. ubuntu16.04安装tensorflow1.3
  10. composer 出现You are running Composer with SSL/TLS protection disabled.
  11. nginx(一)之默认配置文件
  12. 转载 信号量 &lt;第六篇&gt;
  13. 【Codeforces 1132E】Knapsack
  14. php的opcache缓存扩展
  15. QString 的用法
  16. Oracle bacic
  17. Java中的逆变与协变 很直接不饶弯的讲出来了
  18. JDK 动态代理的简单理解
  19. [Arch] 03. Practice UML in project
  20. 【转】总结C++中取成员函数地址的几种方法

热门文章

  1. 针对Kafka的centos系统参数优化
  2. 字典树基础进阶全掌握(Trie树、01字典树、后缀自动机、AC自动机)
  3. A 修公路
  4. SpringBoot 使用 JSR303 自定义校验注解
  5. Step by Step!教你如何在k3s集群上使用Traefik 2.x
  6. 一夜搞懂 | JVM 线程安全与锁优化
  7. javascript入门 之 Ajax(一)
  8. "文本"组件:&lt;text&gt; —— 快应用原生组件
  9. 很用心的为你写了 9 道 MySQL 面试题
  10. classpath和环境变量设置(转)