Test that socket errors when *writing* a request are correctly delivered.