Break out of loop if can't send data

Fixes #4046
auto merge of #4070 : kparaju/servo/master-mime-sniffer-failing-4046, r=jdm

Fixes #4046

I tested it by:

    ./mach test-wpt --include=XMLHttpRequest > old.log
    # make code changes
    ./mach test-wpt --include=XMLHttpRequest > new.log
    grep panic old.log # SnifferManager panics
    grep panic new.log # No SnifferManager panics