aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-26 11:52:27 +0100
committerLoïc Hoguin <[email protected]>2018-11-26 11:52:27 +0100
commit0d9ad0a8445e7ba6e8bf9591257fa4457dda8321 (patch)
tree456dc3ad8457c00c9870bc32f40195d4430104e0 /doc
parent7423a7bb6dde5edc26283544956ae7387fa69688 (diff)
downloadranch-0d9ad0a8445e7ba6e8bf9591257fa4457dda8321.tar.gz
ranch-0d9ad0a8445e7ba6e8bf9591257fa4457dda8321.tar.bz2
ranch-0d9ad0a8445e7ba6e8bf9591257fa4457dda8321.zip
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/src/manual/ranch_proxy_header.header.asciidoc4
1 files changed, 2 insertions, 2 deletions
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
}).
----