mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
builder-next: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
63e62d13a0
commit
3b84875216
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ func (h *reqBodyHandler) newRequest(rc io.ReadCloser) (string, func()) {
|
|||
func (h *reqBodyHandler) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
host := req.URL.Host
|
||||
if strings.HasPrefix(host, urlPrefix) {
|
||||
if req.Method != "GET" {
|
||||
if req.Method != http.MethodGet {
|
||||
return nil, errors.Errorf("invalid request")
|
||||
}
|
||||
id := strings.TrimPrefix(host, urlPrefix)
|
||||
|
|
Loading…
Reference in a new issue