Some functions in sip/parser.rs do redundant computing

Problem:
func is_alphanumeric is a part of func is_token_char, but the two functions are all called by is_request_uri_char.

fn is_token_char(b: u8) → bool {
is_alphanumeric(b) || b"!%'*±._`~".contains(&b)
}

fn is_request_uri_char(b: u8) → bool {
is_alphanumeric(b) || is_token_char(b) || b"~#@:;=?+&$,/".contains(&b)
}

Good observation. Would you mind creating a redmine ticket for the issue?

1 Like

I had just create a ticket, Bug #8003 rust/sip: Some functions do redundant computing