microsoft / restler-fuzzer

RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.
MIT License
2.52k stars 283 forks source link

Fix Content-Type custom payload bugs #888

Closed marina-p closed 2 months ago

marina-p commented 2 months ago

When a custom payload body is used to work around unsupported content types, the Content-Type header must also be modified via the dictionary. This functionality had several bugs, which are fixed in this change. After this update, using either restler_custom_payload_header or restler_custom_payload with the request-specific syntax for dictionary payloads now works as expected, for example:

"restler_custom_payload": { "/stores/{storeId}/order/post/Content-Type": [ "xml" ] }

This change also fixes the same bugs with per-request syntax with restler_custom_payload_query.

Testing: