I thought the rules were clear and it depends on how the word is pronounced, with a vowel or consonant sound.
I have only heard people say H T T P, as specific letters when pronouncing HTTP, and thus the a or an should be based on how one would pronounce the letter "H". And H would be pronounced as "aitch". Starts with an a -> vowel sound -> should be "an".
But I'm a non native english speaker, so I'm happy to be proven wrong.
Some UK speakers pronounce "H" as "haitch" (with a non-silent leading 'h'), not "aitch". Which leads to "a haitch tee ...".
https://en.wikipedia.org/wiki/H#Name