summaryrefslogtreecommitdiff
path: root/client/image_build_test.go
diff options
context:
space:
mode:
authorBoaz Shuster <ripcurld.github@gmail.com>2016-12-06 23:15:27 +0200
committerBoaz Shuster <ripcurld.github@gmail.com>2017-01-10 06:40:06 +0200
commitb1996728aaeaa147c2045c8be79373d59ce7117a (patch)
treecbf92b4cf67d2ea555d10c3a6384f01964dc90a0 /client/image_build_test.go
parent8563492eefb1653c7e83b539a254446a555961e3 (diff)
downloaddocker-b1996728aaeaa147c2045c8be79373d59ce7117a.tar.gz
Update docs and code to use application/x-tar in the build API
At the "Build image from Dockerfile" section in the API docs the Content-Type header is missing. In addition, some parts in the code are still setting the Content-Type header to application/tar while it was changed to application/x-tar since 16th September 2015. Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Diffstat (limited to 'client/image_build_test.go')
-rw-r--r--client/image_build_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/image_build_test.go b/client/image_build_test.go
index b9d04f817a..1e18b7bda8 100644
--- a/client/image_build_test.go
+++ b/client/image_build_test.go
@@ -170,8 +170,8 @@ func TestImageBuild(t *testing.T) {
return nil, fmt.Errorf("X-Registry-Config header not properly set in the request. Expected '%s', got %s", buildCase.expectedRegistryConfig, registryConfig)
}
contentType := r.Header.Get("Content-Type")
- if contentType != "application/tar" {
- return nil, fmt.Errorf("Content-type header not properly set in the request. Expected 'application/tar', got %s", contentType)
+ if contentType != "application/x-tar" {
+ return nil, fmt.Errorf("Content-type header not properly set in the request. Expected 'application/x-tar', got %s", contentType)
}
// Check query parameters