pkg/tool/http: restore Do request header/trailer to accept single strings
https://cuelang.org/cl/1221921 added http.Serve,
which supports both requests and response objects with headers.
As part of that review, the type of the headers map was altered
to be just a list of strings, but it seems like http.Do.request
was changed as well, perhaps by accident or a search-and-replace.
This broke users who were setting an http.Do's request header
to a single string value, which worked on v0.15.x but broke on v0.16.0.
Add a test, and revert the backwards incompatible change.
Fixes #4329.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ie8c4802501861f76ca3aab97e0e97bb60c9aaf3f
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1235490
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>