added tests, fixed syntax and and unsupported range header handling