Improved range-related code
Improved range-related code

Created a function that obtains the range from the header and extracted the
regex to compile it only once.

tooxie/shiva-server,maurodelazeri/shiva-server,maurodelazeri/shiva-server,tooxie/shiva-server