fixed parsing of http request to make it generic