net/http: fix data race in test

I can't reproduce the race, but this should fix it.

Fixes Issue 8483

LGTM=dvyukov
R=dvyukov
CC=golang-codereviews
https://codereview.appspot.com/126610043