mirror of https://github.com/docker/docs.git
Merge pull request #2375 from NanXiao/error-handle-in-postContainersCreate
Check r.ParseForm() error in postContainersCreate().
This commit is contained in:
commit
e7b8b4c6eb
|
@ -537,7 +537,10 @@ func getContainerJSON(c *context, w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
// POST /containers/create
|
// POST /containers/create
|
||||||
func postContainersCreate(c *context, w http.ResponseWriter, r *http.Request) {
|
func postContainersCreate(c *context, w http.ResponseWriter, r *http.Request) {
|
||||||
r.ParseForm()
|
if err := r.ParseForm(); err != nil {
|
||||||
|
httpError(w, err.Error(), http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
var (
|
var (
|
||||||
defaultMemorySwappiness = int64(-1)
|
defaultMemorySwappiness = int64(-1)
|
||||||
name = r.Form.Get("name")
|
name = r.Form.Get("name")
|
||||||
|
|
Loading…
Reference in New Issue