SMTP: \r\n\r (without second \n) as double newline

前端 未结 2 712
死守一世寂寞
死守一世寂寞 2021-01-22 05:51

I have SMTP parser that works mostly fine. There is a problem when receiving traffic from third party software that sends double newlines as \"\\r\\n\\r\" (without the second \"

2条回答
  •  青春惊慌失措
    2021-01-22 06:08

    Various operating systems have various representations for Newline characters. Check the instructions here on newline characters.. By the way its a common practice among programmers to use both the \n and \r together to prevent any conflicts on the system. You need to check which newline character is supported by your system. If its \r then you are getting both the required characters. But if its \n, then the error lies with the sender.

提交回复
热议问题