Home > Software engineering >  You who are familiar with the language of RFC documents, can help to translate them, the following i
You who are familiar with the language of RFC documents, can help to translate them, the following i

Time:10-12

This seems to be about HTTP chunk described in RFC (from) online, but I really don't understand what it is, who can use natural language to translate them? Or no actual example, thank you!

Chunked - Body=* the chunk
The last - the chunk
Trailer
CRLF

[the chunk chunk=the chunk - size - the extension] CRLF
The chunk - data CRLF
The chunk - size=1 * HEX
The last - the chunk=1 * (" 0 ") [the chunk - the extension] CRLF

The chunk - the extension=* (";" The chunk - ext - name ["="the chunk - ext - val])
The chunk - ext - name=token
The chunk - ext - val=token | quoted - string
The chunk - data=https://bbs.csdn.net/topics/chunk-size (OCTET)
Trailer=* (entity - the header CRLF)

Best can for an example and a description of it,

CodePudding user response:

The HTTP when block transfer encoding is used, is to describe the format of the data, is Chunked - the Body into the encoded data, and described above points four parts can know,
* the chunk, the last - the chunk, trailer, CRLF these four connected,
[the chunk chunk=the chunk - size - the extension] CRLF
The chunk - data CRLF
This then describes the chunk format, according to describe the size, then \ r \ n, followed by as long as the size of the data, then the \ r \ n
The chunk - size=1 * HEX number are banned says size 16, said, for example: the length of the 1120, do you want us to use hexadecimal distinguish each were 31 30, 31 and 32.
Last - the chunk=1 * (" 0 ") [the chunk - the extension] CRLF last chunk length 0, described here is no data, you will be received 30 0 0 d a,

Trailer is attached header
The chunk - the extension is communication consultation,

Detailed you can Google it, I didn't realize this the httpserver support

CodePudding user response:

reference 1st floor accessysq response:
this describes HTTP when using block transfer encoding, data format, Chunked - Body is into the encoded data, and described above points four parts can know,
* the chunk, the last - the chunk, trailer, CRLF these four connected,
[the chunk chunk=the chunk - size - the extension] CRLF
The chunk - data CRLF
This then describes the chunk format, according to describe the size, then \ r \ n, followed by as long as the size of the data, then the \ r \ n
The chunk - size=1 * HEX number are banned says size 16, said, for example: the length of the 1120, do you want us to use hexadecimal distinguish each were 31 30, 31 and 32.
Last - the chunk=1 * (" 0 ") [the chunk - the extension] CRLF last chunk length 0, described here is no data, you will be received 30 0 0 d a,

Trailer is attached header
The chunk - the extension is communication consultation,

Detailed you can Google it, I didn't realize this the httpserver support


Thank you very much for your explanation, I understand a bit, but there are still some details to be implemented, such as:

1. [the chunk - the extension], this what you said is "communication consultation", how to understand this, and why take brackets here?
The chunk - the extension=* (";" The chunk - ext - name ["="the chunk - ext - val]), completely don't understand=behind is to express what you mean?
2. The chunk - size=1 * HEX, the size of the said the chunk package, but in front of "1 *" is what meaning, is that the format of the term, what meaning be?
3. The chunk - ext - val=token | quoted - string
The chunk - data=https://bbs.csdn.net/topics/chunk-size (OCTET)
Trailer=* (entity - the header CRLF)
The three also don't understand is what meaning,

CodePudding user response:

Octer is stricter, said 8 bit, now computer a byte is 8 bytes, so is a byte,

CodePudding user response:

The chunk - this does not necessarily have the extension, depends on the specific circumstances, behind a few need not consider,
The chunk - data than you actually are the chunk coding an array of content, the length is the chunk - size, octer upstairs and explained to you,
The chunk size - you mean length according to hexadecimal, Hex is this meaning, at least 1, * uncapped,
But I write wrong the example above, such as a chunk you want from the code in the array sent 18 (decimal) bytes, then press hexadecimal send is 12, so you will send out 12 with character, 1 ASCII value is 0 x31, 2 is 0 x32. So send is 0 x31 0 x32 these two values, I forgot to turn hexadecimal,

CodePudding user response:

"Http authority guidelines"?
  • Related