0
在終端好像沒有什麼區別兩個什麼之間的區別 r n和 n
echo -en 'first\r\nsecond'
和echo -en 'first\n\second'
但沒有\ r代碼它不工作
echo -en 'GET /test HTTP/1.1\r\nHost: localhost\r\n\r\n' | nc localhost 9292
作品,但
echo -en 'GET /test HTTP/1.1\r\nHost: localhost\n\n' | nc localhost 9292
不
任何人都可以解釋它爲什麼是?
請參閱http://stackoverflow.com/questions/3091524/what-are-carriage-return-linefeed-and-form-feed – Zaki 2012-03-07 15:57:30