added performance section
tolerate // in path. remove trailing / from prefix. dynamically alloc buffer for header entries