Appendix A. Differences between HTTP and MIME

HTTP/1.1์€ ๋ฉ”์‹œ์ง€ ๋ณธ๋ฌธ์„ ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ๋‹ค์–‘ํ•œ ํ‘œํ˜„๊ณผ ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ํ—ค๋” ํ•„๋“œ๋กœ ์ „์†กํ•˜๊ธฐ ์œ„ํ•ด ์ธํ„ฐ๋„ท ๋ฉ”์‹œ์ง€ ํ˜•์‹ [RFC5322] ๋ฐ ๋‹ค๋ชฉ์  ์ธํ„ฐ๋„ท ๋ฉ”์ผ ํ™•์žฅ์ž(MIME)[RFC2045]์— ๋Œ€ํ•ด ์ •์˜๋œ ๋งŽ์€ ๊ตฌ์„ฑ์„ ์‚ฌ์šฉํ•œ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜, RFC 2045๋Š” ์ด๋ฉ”์ผ์—๋งŒ ์ดˆ์ ์„ ๋งž์ถ˜๋‹ค; HTTP์˜ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ์ด๋ฉ”์ผ๊ณผ ๋‹ค๋ฅธ ๋งŽ์€ ํŠน์„ฑ์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค; ๋”ฐ๋ผ์„œ HTTP๋Š” MIME๊ณผ ๋‹ค๋ฅธ ํŠน์ง•์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค. ์ด๋Ÿฌํ•œ ์ฐจ์ด์ ์€ ์ด์ง„ ์—ฐ๊ฒฐ๋ณด๋‹ค ์„ฑ๋Šฅ์„ ์ตœ์ ํ™”ํ•˜๊ณ , ์ƒˆ๋กœ์šด ๋ฏธ๋””์–ด ์œ ํ˜•์„ ๋” ์ž์œ ๋กญ๊ฒŒ ์‚ฌ์šฉํ•˜๊ณ , ๋‚ ์งœ ๋น„๊ต๋ฅผ ๋” ์‰ฝ๊ฒŒ ํ•˜๊ณ , ๊ทธ๋ฆฌ๊ณ  ๋” ์‰ฝ๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด ์‹ ์ค‘ํ•˜๊ฒŒ ์„ ํƒ๋˜์—ˆ๋‹ค. ์ดˆ๊ธฐ HTTP ์„œ๋ฒ„ ๋ฐ ํด๋ผ์ด์–ธํŠธ์˜ ๊ด€ํ–‰์„ ์ธ์ •ํ•œ๋‹ค.

์ด ๋ถ€๋ก์€ HTTP๊ฐ€ MIME๊ณผ ๋‹ค๋ฅธ ํŠน์ • ์˜์—ญ์„ ์„ค๋ช…ํ•œ๋‹ค. ์—„๊ฒฉํ•œ MIME ํ™˜๊ฒฝ์œผ๋กœ์˜ ํ”„๋ฝ์‹œ ๋ฐ ๊ฒŒ์ดํŠธ์›จ์ด๋Š” ์ด๋Ÿฌํ•œ ์ฐจ์ด๋ฅผ ์ธ์‹ํ•˜๊ณ  ํ•„์š”ํ•œ ๊ฒฝ์šฐ ์ ์ ˆํ•œ ๋ณ€ํ™˜์„ ์ œ๊ณตํ•ด์•ผ ํ•œ๋‹ค.

A.1. MIME-Version

HTTP๋Š” MIME ํ˜ธํ™˜ ํ”„๋กœํ† ์ฝœ์ด ์•„๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋ฉ”์‹œ์ง€์—๋Š” ๋ฉ”์‹œ์ง€ ๊ตฌ์„ฑ์— ์‚ฌ์šฉ๋œ MIME ํ”„๋กœํ† ์ฝœ ๋ฒ„์ „์„ ๋‚˜ํƒ€๋‚ด๋Š” ๋‹จ์ผ MIME ๋ฒ„์ „ ํ—ค๋” ํ•„๋“œ๊ฐ€ ํฌํ•จ๋  ์ˆ˜ ์žˆ๋‹ค. MIME-Version ํ—ค๋” ํ•„๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ฉ”์‹œ์ง€๊ฐ€ MIME ํ”„๋กœํ† ์ฝœ([RFC2045]์—์„œ ์ •์˜)์„ ์™„์ „ํžˆ ์ค€์ˆ˜ํ•จ์„ ๋‚˜ํƒ€๋‚ธ๋‹ค. ๋ฐœ์‹ ์ž๋Š” HTTP ๋ฉ”์‹œ์ง€๋ฅผ ์—„๊ฒฉํ•œ MIME ํ™˜๊ฒฝ์œผ๋กœ ๋‚ด๋ณด๋‚ผ ๋•Œ(๊ฐ€๋Šฅํ•œ ๊ฒฝ์šฐ) ์™„์ „ํ•œ ์ ํ•ฉ์„ฑ์„ ๋ณด์žฅํ•  ์ฑ…์ž„์ด ์žˆ๋‹ค.

A.2. Conversion to Canonical Form

MIME์€ [RFC2049]์˜ Section 4์— ๊ธฐ์ˆ ๋œ ๋ฐ”์™€ ๊ฐ™์ด ์ธํ„ฐ๋„ท ๋ฉ”์ผ ๋ณธ๋ฌธ ๋ถ€๋ถ„์„ ์ „์†ก ์ „์— ํ‘œ ์ค€ ํ˜•์‹์œผ๋กœ ๋ณ€ํ™˜ํ•  ๊ฒƒ์„ ์š”๊ตฌํ•œ๋‹ค. ๋ณธ ๋ฌธ์„œ์˜ Section 3.1.1.3์€ HTTP๋ฅผ ํ†ตํ•ด ์ „์†ก๋  ๋•Œ โ€œtextโ€ ๋ฏธ๋””์–ด ํƒ€์ž…์˜ ํ•˜์œ„ ํƒ€์ž…์— ํ—ˆ์šฉ๋˜๋Š” ์–‘์‹์„ ์„ค๋ช…ํ•œ๋‹ค. [RFC2046]์—์„œ๋Š” โ€œtextโ€ ํƒ€์ž…์˜ ์ฝ˜ํ…์ธ ๊ฐ€ ์ค„ ๋ฐ”๊ฟˆ์„ CRLF๋กœ ๋‚˜ํƒ€๋‚ด๋ฉฐ ์ค„ ๋ฐ”๊ฟˆ ์ˆœ์„œ ์ด์™ธ์˜ CR ๋˜๋Š” LF ์‚ฌ์šฉ์„ ๊ธˆ์ง€ํ•˜๋„๋ก ์š”๊ตฌํ•œ๋‹ค. HTTP๋Š” CRLF, bare CR ๋ฐ bare LF๊ฐ€ ํ…์ŠคํŠธ ๋‚ด์šฉ ๋‚ด์—์„œ ์ค„ ๋ฐ”๊ฟˆ์„ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๋„๋ก ํ•œ๋‹ค.

A.3. Conversion of Date Formats

A.4. Conversion of Content-Encoding

MIME์—๋Š” HTTP/1.1์˜ Content-Encoding ํ—ค๋” ํ•„๋“œ์— ํ•ด๋‹นํ•˜๋Š” ๊ฐœ๋…์ด ํฌํ•จ๋˜์ง€ ์•Š๋Š” ๋‹ค. ์ด๊ฒƒ์ด ๋ฏธ๋””์–ด ํƒ€์ž…์— ์ˆ˜์‹์–ด ์—ญํ• ์„ ํ•˜๊ธฐ ๋•Œ๋ฌธ์—, HTTP์—์„œ MIME ํ˜ธํ™˜ ํ”„๋กœํ† ์ฝœ๋กœ ํ”„์‹œ ๋ฐ ๊ฒŒ์ดํŠธ์›จ์ด๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ์ „๋‹ฌํ•˜๊ธฐ ์ „์— Content-Type ํ—ค๋” ํ•„๋“œ์˜ ๊ฐ’์„ ๋ณ€๊ฒฝํ•˜๊ฑฐ๋‚˜ ํ‘œํ˜„์„ ๋””์ฝ”๋”ฉํ•ด์•ผ ํ•œ๋‹ค. (์ธํ„ฐ๋„ท ๋ฉ”์ผ์šฉ Content-Type์˜ ์ผ๋ถ€ ์‹คํ—˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ๋Š” โ€œ;conversations= <content-coding>โ€ ์˜ ๋ฏธ๋””์–ด ํƒ€์ž… ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Content-Encoding๊ณผ ๋™๋“ฑํ•œ ๊ธฐ๋Šฅ์„ ์ˆ˜ํ–‰ํ–ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ด ๋งค๊ฐœ๋ณ€์ˆ˜๋Š” MIME ํ‘œ์ค€์˜ ์ผ๋ถ€๊ฐ€ ์•„๋‹ˆ๋‹ค.

A.5. Conversion of Content-Transfer-Encoding

HTTP๋Š” MIME์˜ Content-Transfer-Encoding ํ•„๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค. MIME ํ˜ธํ™˜ ํ”„๋กœํ† ์ฝœ์—์„œ HTTP๋กœ ๊ฐ€๋Š” ํ”„๋ฝ์‹œ ๋ฐ ๊ฒŒ์ดํŠธ์›จ์ด๋Š” ์‘๋‹ต ๋ฉ”์‹œ์ง€๋ฅผ HTTP ํด๋ผ์ด์–ธํŠธ์— ์ „๋‹ฌํ•˜๊ธฐ ์ „์— Content-Transfer-Encoding ์„ ์ œ๊ฑฐํ•ด์•ผ ํ•œ๋‹ค.

A.6. MHTML and Line Length Limitations

Last updated