intelligently guesses the version from the header or url