From 0d9ad0a8445e7ba6e8bf9591257fa4457dda8321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 26 Nov 2018 11:52:27 +0100 Subject: Use the correct CRC32 algorithm for the PROXY header Turns out it wasn't the plain CRC32 algorithm that should have been used, whoops! The implementation was adapted from pseudo code from Thomas Cioppettini. I've renamed the PROXY header building option value for checksum from crc32 to crc32c and updated the documentation. There is no support for plain crc32 checksums. --- doc/src/manual/ranch_proxy_header.header.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/src/manual/ranch_proxy_header.header.asciidoc b/doc/src/manual/ranch_proxy_header.header.asciidoc index 4dc5044..c551110 100644 --- a/doc/src/manual/ranch_proxy_header.header.asciidoc +++ b/doc/src/manual/ranch_proxy_header.header.asciidoc @@ -13,7 +13,7 @@ header(ProxyInfo, BuildOpts) -> iodata() ProxyInfo :: ranch_proxy_header:proxy_info() BuildOpts :: #{ - checksum => crc32, + checksum => crc32c, padding => pos_integer() %% >= 3 } ---- @@ -63,7 +63,7 @@ Data = ranch_proxy_header:parse(ProxyInfo). [source,erlang] ---- Data = ranch_proxy_header:parse(ProxyInfo, #{ - checksum => crc32, + checksum => crc32c, padding => 7 }). ---- -- cgit v1.2.3