


RCA: Failure to pay attention to the HTTP/1.1 characteristics of Curl-library Post when it is above 1024 bytes leads to HessianPHP transmission_PHP tutorial
First list the error messages of HessianPHP:
Basic knowledge background: 1) The ins and outs of “Expect: 100-continue”: The purpose of designing the 100 (Continue) HTTP status code in the HTTP/1.1 protocol is that before the client sends a Request Message, the HTTP/1.1 protocol allows the client to first determine whether the server is willing to accept the message body sent by the client (based on Request Headers ). That is, Client and Server allow both parties to "handshake" before Posting (larger) data. If they match, the Client will start sending (larger) data. The reason for this is that if the client directly sends the request data, but the server rejects the request, this behavior will cause a lot of resource overhead. The protocol requirements for HTTP/1.1 clients are:
header field! 2) libcurl enables the "Expect:100-continue' feature when sending data larger than 1024 bytes:
1. Send a request, including an "Expect: 100-continue" header field, asking the Server if it is willing to receive data; 2. After receiving the 100-continue response returned by the Server, the data is POSTed to the Server;
zxgfa added in 2012:
(Zheng Yun's Note 1: lighttpd Version 1.4 had this serious problem, which was fixed in version 1.5. Zheng Yun Note 2: Resin added support for Expect: 100-continue in version 3.0.5. )
3) PHP Curl-library can actively block this feature: Someone left a message under PHP Manual::curl_setopt : PHP curl complies with the characteristics of libcurl. Since not all web servers support this feature, various errors can occur. If you encounter this, you can use the following command to block the "Expect" header field:
<span class="html"><span class="default"> <?php <code><span class="html"><span class="default"> <?php </span></span></span></span></span>
<span class="html"><span class="default"> curl_setopt</span><span class="keyword">(</span><span class="default">$ch</span><span class="keyword">,<span class="Apple-converted-space"> </span></span><span class="default">CURLOPT_HTTPHEADER</span><span class="keyword">, array(</span><span class="string">'Expect:'</span><span class="keyword">));<br></span><span class="default"> ?><br></span><span pooy><br></span></span>
<span class="html"><span class="default"> curl_setopt<img class="decoded" src="RCA:%20Failure%20to%20pay%20attention%20to%20the%20HTTP/1.1%20characteristics%20of%20Curl-library%20Post%20when%20it%20is%20above%201024%20bytes%20leads%20to%20HessianPHP%20transmission_PHP%20tutorial" alt="RCA: Failure to pay attention to the HTTP/1.1 characteristics of Curl-library Post when it is above 1024 bytes leads to HessianPHP transmission_PHP tutorial"><span class="keyword">(<hr>
<span class="default">$ch<strong><span class="keyword">,</span></strong> <ul>
<li><span class="default">CURLOPT_HTTPHEADER</span></li>
<span class="keyword">, array(</span>
</ul>
<span class="string"> 'Expect:'<hr>
<span class="keyword">));<strong></strong><span class="default"> ?><br><blockquote hessian post><span the pooy sample code is as follows:><strong></strong></span></blockquote></span></span></span></span></span></span></span>
Figure 1 You can convince PHP's curl backend to stop doing the 100-continue-thing by setting an explicit request header
According to the HessianTransport code, "Hessian request using the CURL library".
http://www.bkjia.com/PHPjc/440146.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440146.htmlTechArticleFirst list the error messages of HessianPHP: Basic knowledge background: 1) The ins and outs of Expect: 100-continue: HTTP/ 1.1 The purpose of designing the 100 (Continue) HTTP status code in the protocol is to...

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Understand the meaning of HTTP 301 status code: common application scenarios of web page redirection. With the rapid development of the Internet, people's requirements for web page interaction are becoming higher and higher. In the field of web design, web page redirection is a common and important technology, implemented through the HTTP 301 status code. This article will explore the meaning of HTTP 301 status code and common application scenarios in web page redirection. HTTP301 status code refers to permanent redirect (PermanentRedirect). When the server receives the client's

Detailed explanation of the role of .ibd files in MySQL and related precautions MySQL is a popular relational database management system, and the data in the database is stored in different files. Among them, the .ibd file is a data file in the InnoDB storage engine, used to store data and indexes in tables. This article will provide a detailed analysis of the role of the .ibd file in MySQL and provide relevant code examples to help readers better understand. 1. The role of .ibd files: storing data: .ibd files are InnoDB storage

PHP is a programming language widely used in website development, and page jumps and carrying POST data are common requirements in website development. This article will introduce how to implement PHP page jump and carry POST data, including specific code examples. In PHP, page jumps are generally implemented through the header function. If you need to carry POST data during the jump process, you can do it through the following steps: First, create a page containing a form, where the user fills in the information and clicks the submit button. Acti in the form

How to implement HTTP streaming in C++? Create an SSL stream socket using Boost.Asio and the asiohttps client library. Connect to the server and send an HTTP request. Receive HTTP response headers and print them. Receives the HTTP response body and prints it.

You can use the RCA universal remote to simplify remote control management. With various models, you can control up to eight devices, eliminating the need for multiple remotes and reducing clutter. Be patient in programming the remote and follow the simple steps provided. So, if you want to configure an RCA universal remote using codes, this article is for you. How to Configure an RCA Universal Remote Using Codes To configure an RCA Universal remote using codes, use one of the methods below. Programming the RCA Universal Remote Using the Automatic Programming Method Programming the RCA Universal Remote Using Direct Code Let’s talk about it in detail. 1] To program the RCA universal remote control using the automatic programming method, we must first use a simple

Title: PHP code example: How to use POST to pass parameters and implement page jumps In web development, it often involves the need to pass parameters through POST and process them on the server side to implement page jumps. PHP, as a popular server-side scripting language, provides a wealth of functions and syntax to achieve this purpose. The following will introduce how to use PHP to implement this function through a practical example. First, we need to prepare two pages, one to receive POST requests and process parameters

There is no concept of a class in the traditional sense in Golang (Go language), but it provides a data type called a structure, through which object-oriented features similar to classes can be achieved. In this article, we'll explain how to use structures to implement object-oriented features and provide concrete code examples. Definition and use of structures First, let's take a look at the definition and use of structures. In Golang, structures can be defined through the type keyword and then used where needed. Structures can contain attributes

Solution: 1. Retry: You can wait for a period of time and try again, or refresh the page; 2. Check the server load: Check the server's CPU, memory and disk usage. If the capacity limit is exceeded, you can try to optimize the server configuration or increase the capacity. Server resources; 3. Check server maintenance and upgrades: You can only wait until the server returns to normal; 4. Check network connection: Make sure the network connection is stable, check whether the network device, firewall or proxy settings are correct; 5. Ensure cache or CDN configuration Correct; 6. Contact the server administrator, etc.
