Browse code

return write error

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)

Victor Vieux authored on 2014/05/03 07:03:59
Showing 2 changed files
... ...
@@ -978,8 +978,8 @@ func writeCorsHeaders(w http.ResponseWriter, r *http.Request) {
978 978
 }
979 979
 
980 980
 func ping(eng *engine.Engine, version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
981
-	w.Write([]byte{'O', 'K'})
982
-	return nil
981
+	_, err := w.Write([]byte{'O', 'K'})
982
+	return err
983 983
 }
984 984
 
985 985
 func makeHttpHandler(eng *engine.Engine, logging bool, localMethod string, localRoute string, handlerFunc HttpApiFunc, enableCors bool, dockerVersion version.Version) http.HandlerFunc {
... ...
@@ -1181,6 +1181,7 @@ Ping the docker server
1181 1181
     Status Codes:
1182 1182
 
1183 1183
     -   **200** - no error
1184
+    -   **500** - server error
1184 1185
 
1185 1186
 ### Create a new image from a container's changes
1186 1187