Configuration File Upload Using XML API Fails with “400 Bad Request”
14392
Created On 04/02/19 12:48 PM - Last Modified 04/03/19 15:47 PM
Symptom
Configuration file upload to the firewall using XML API Fails with “400 Bad Request”
SSL handshake completes successfully, “100 Continue” response is seen, then fails with “400 Bad Request”
Cause
One of the most common issues is incorrect content type of multipart/form-data.
Resolution
The correct content type of multipart/form-data must be used for this operation.
If using Curl, use “--form file=@config.xml” instead of “--data” or another POST type.
Example: curl --form file=@fw-config.xml https://<fwip>/api/?type=import&category=configuration&key=<key>
Additional Information
Refer to the main page for Curl for more details on syntax.
https://curl.haxx.se/docs/manpage.html