|
@@ -17,7 +17,7 @@ import (
|
|
|
const APIVersionKey = "api-version"
|
|
|
|
|
|
// APIFunc is an adapter to allow the use of ordinary functions as Docker API endpoints.
|
|
|
-// Any function that has the appropriate signature can be register as a API endpoint (e.g. getVersion).
|
|
|
+// Any function that has the appropriate signature can be registered as a API endpoint (e.g. getVersion).
|
|
|
type APIFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error
|
|
|
|
|
|
// HijackConnection interrupts the http response writer to get the
|
|
@@ -75,7 +75,7 @@ func ParseForm(r *http.Request) error {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
-// ParseMultipartForm ensure the request form is parsed, even with invalid content types.
|
|
|
+// ParseMultipartForm ensures the request form is parsed, even with invalid content types.
|
|
|
func ParseMultipartForm(r *http.Request) error {
|
|
|
if err := r.ParseMultipartForm(4096); err != nil && !strings.HasPrefix(err.Error(), "mime:") {
|
|
|
return err
|