#! /bin/sh

# Jonathan Frech, 2021-10-02
# http headers of note

headgrep () {
    printf '# %s\n' "$1"
    curl -fsSLD- -o/dev/null "$1" | grep "$2"
    printf '\n'
}

headgrepall () {
    headgrep wordpress.com ^x-ac
    headgrep conrad.de ^cf-ray
    headgrep twitter.com ^x-connection-hash
    headgrep pine64.org ^X
    headgrep golang.org ^alt-svc
    headgrep nintendo.com ^NODE
    headgrep www.vim.org ^Content-Language
    headgrep hp.com ^x-dispatcher
    headgrep ibm.com ^HTTP
}

headgrepall | sed 's/\r//g' > http-headers-of-note.sh.output-"$(date +%s)"
