decode path and query