[ee122] ending CRLF

benjlau at berkeley.edu benjlau at berkeley.edu
Sun Oct 28 18:45:45 PDT 2007


I noticed that the example on the project write up for chunking is

<512 bytes of data, plus an additional CRLF>
1b
<27 bytes of data, plus an additional CRLF>
0
<blank line here>

This is the grammar for chunking in the RFC and other pages:

       Chunked-Body   = *chunk
                        last-chunk
                        trailer
                        CRLF

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

So we are not only ignoring trailer and chunk-extension, we are also
ignoring the very last CRLF (in the chunked body) for thisproject?  If we
are not ignoring the last CRLF, shouldn't it be:

0
<blank line here>
<blank line here>





More information about the ee122 mailing list