review feedback

This commit is contained in:
Paul Bellamy committed 2015-09-22 15:09:32 +01:00
1 parent 74c3b0d079
commit 3e4d8a3ffe
5 files changed
+29 -17

No files matched your search

+6 -3
View File
@@ -14,11 +14,11 @@ type startContainerRequestBody struct {
func (i *startContainerInterceptor) InterceptRequest(r *http.Request) error {
container, err := inspectContainerInPath(i.proxy.client, r.URL.Path)
if err != nil || !containerShouldAttach(container) {
if err != nil {
return err
}
if r.Header.Get("Content-Type") != "application/json" {
if !containerShouldAttach(container) || r.Header.Get("Content-Type") != "application/json" {
i.proxy.createWait(r, container.ID)
return nil
}
@@ -35,8 +35,11 @@ func (i *startContainerInterceptor) InterceptRequest(r *http.Request) error {
}
}
if err := marshalRequestBody(r, hostConfig); err != nil {
return err
}
i.proxy.createWait(r, container.ID)
return marshalRequestBody(r, hostConfig)
return nil
}
func (i *startContainerInterceptor) InterceptResponse(r *http.Response) error {