Apache-Httpd
apache錯誤日誌中的換行符
我正在檢查我的
access.log
文件,我遇到了以下幾行:66.240.236.119 - - [26/Apr/2019:04:15:56 +0200] "\n" 400 3245 "-" "-" 66.240.236.119 - - [26/Apr/2019:04:15:58 +0200] "\n" 400 3261 "-" "-" 66.240.236.119 - - [26/Apr/2019:04:15:58 +0200] "\n" 400 3239 "-" "-" 66.240.236.119 - - [26/Apr/2019:04:15:59 +0200] "\n" 400 3239 "-" "-" 66.240.236.119 - - [26/Apr/2019:04:16:00 +0200] "\n" 400 3239 "-" "-"
方法是怎麼來的
\n
?我以前在訪問日誌中沒有遇到過這種情況,所以我有點擔心。
看起來有人觸發了“換行請求”,例如
printf '\n' | nc localhost 80
這在 access.log 中產生:
127.0.0.1 - - [27/Apr/2019:01:39:38 +0200] "\n" 400 0 "-" "-"
可能是為了測試你的伺服器……