1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

strip continuation of received headers

هذا الالتزام موجود في:
Charlie Smurthwaite
2017-08-10 02:04:23 +01:00
الأصل 2a9702ba47
التزام a63c62ba62

عرض الملف

@@ -355,13 +355,15 @@ module Postal
if @header_key && @headers[@header_key.downcase] && @headers[@header_key.downcase].last
@headers[@header_key.downcase].last << data.to_s
end
# If received headers are configured to be stripped and we're currently receiving one
# skip the append methods at the bottom of this loop.
next if Postal.config.smtp_server.strip_received_headers? && @header_key && @header_key.downcase == "received"
else
@header_key, value = data.split(/\:\s*/, 2)
@headers[@header_key.downcase] ||= []
@headers[@header_key.downcase] << value
if Postal.config.smtp_server.strip_received_headers? && @header_key.downcase == "received"
next
end
# As above
next if Postal.config.smtp_server.strip_received_headers? && @header_key && @header_key.downcase == "received"
end
end
@data << data