txtinfo: move http header related functions into common code