Connection expression error message reports all invalid variables.
Removed prefix if pathname is empty.