HTTP协议为什么是基于纯文本的

 

以下是摘自stackoverflow.com的回答

 

A reason that's both technical and historical is that text protocols are almost always preferred in the Unix world.

Well, this is not really a reason but a pattern. The rationale behind this is that text protocols allows you to see what's going on on the network by just dumping everything that goes through. You don't need a specialized analyzer as you need for TCP/IP. This makes it easier to debug and easier to maintain.

Not only HTTP, but many protocols are text based (e.g., SMTP).

You might want to take a look at The Art of Unix Programming for a much more detailed explanation of this Unix thing.

 

 

你可能感兴趣的:(http协议)