curl: error out if -T and -d are used for the same URL

As one implies PUT and the other POST, both cannot be used
simultaneously.

Add test 378 to verify.

Reported-by: Boris Verkhovskiy
Fixes #8704
Closes #8715
This commit is contained in:
Daniel Stenberg 2022-04-17 11:18:16 +02:00
parent 6968fb9d54
commit 01a1697a79
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 54 additions and 6 deletions

View file

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -127,7 +127,8 @@ typedef enum {
HTTPREQ_GET,
HTTPREQ_HEAD,
HTTPREQ_MIMEPOST,
HTTPREQ_SIMPLEPOST
HTTPREQ_SIMPLEPOST,
HTTPREQ_PUT
} HttpReq;