From 6ea98363be4ea1da49ad73d05642c7d41a85013c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franc=CC=A7ois=20Mockers?= Date: Sun, 4 Nov 2018 22:28:46 +0100 Subject: [PATCH] add missing reserved and extra characters --- src/uri.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uri.rs b/src/uri.rs index d01e180a8..bed8bb518 100644 --- a/src/uri.rs +++ b/src/uri.rs @@ -10,9 +10,9 @@ const SUB_DELIMS: &[u8] = b"!$'()*,+?=;"; // https://tools.ietf.org/html/rfc3986#section-2.2 #[allow(dead_code)] -const RESERVED: &[u8] = b":/?#[]@!$'()*,+?=;"; +const RESERVED: &[u8] = b":/?#[]@!$&'()*,+?;="; #[allow(dead_code)] -const RESERVED_PLUS_PERCENT: &[u8] = b":/?#[]@!$'()*,+?=;%"; +const RESERVED_PLUS_EXTRA: &[u8] = b":/?#[]@!$&'()*,+?;=%^ <>\"\\`{}|"; // https://tools.ietf.org/html/rfc3986#section-2.3 #[allow(dead_code)] @@ -39,7 +39,7 @@ fn set_bit(array: &mut [u8], ch: u8) { lazy_static! { static ref UNRESERVED_QUOTER: Quoter = { Quoter::new(UNRESERVED, b"") }; - pub(crate) static ref RESERVED_QUOTER: Quoter = { Quoter::new(RESERVED_PLUS_PERCENT, b"") }; + pub(crate) static ref RESERVED_QUOTER: Quoter = { Quoter::new(RESERVED_PLUS_EXTRA, b"") }; } #[derive(Default, Clone, Debug)]