For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Waloo5's avatar
Waloo5
Icon for Nimbostratus rankNimbostratus
Apr 18, 2025

Change Content-Type from application/octet-stream to multipart/form-data

Hi all,

If some one has experiance an integration of ASM and ICAP server :

Our HTTP POST requests are using Content-Type: application/octet-stream, and for the ASM Antivirus ICAP functionality the BIG-IP needs: Content-Type: multipart/form-data

How can I remediate or method to resolve the issue?

iRule?        If iRule can resolve, there are risk or limitations?

NB: No possibility to change in the application content-type

 

 

 

2 Replies

  • multipart/form-data is usually used for html form submission, including file object if using html form.
    API post request usually doesnt use html form format so wont be suitable for multipart/form-data.

    I suggest you discuss with the app developer team, e.g. to use text/xml for xml post or application/json for json post, so more specific than general application/octet-stream.

  • Waloo5's avatar
    Waloo5
    Icon for Nimbostratus rankNimbostratus

    Hello zamroni777​ ,

    Thank you for your feedback.

    To clarify, our application does include an HTML form submission with files upload functionality, where the developer has set the Content-Type to application/octet-stream. However, F5 ASM does not allow this integration in its current form expects multipart/form-data.

    Since modifying the application is not an option, I would like to explore whether an iRule can be implemented on the F5 to:

    1. Intercept the request.
    2. Modify the Content-Type header from application/octet-stream to multipart/form-data.
    3. Ensure the file payload remains intact during the transformation.

    Could some one confirm if this is feasible via an iRule or another F5 configuration?