bruno icon indicating copy to clipboard operation
bruno copied to clipboard

feat(): support multipart mixed

Open alfonso-presa opened this issue 9 months ago • 7 comments

Description

This is a fix in order to support multipart mixed content-type. It's quite similar to multipart/form-data, but as Form-Data and Axios are forcing a content-type change, patching is needed.

Reported in https://github.com/usebruno/bruno/issues/4178

Contribution Checklist:

  • [X] The pull request only addresses one issue or adds one feature.
  • [X] The pull request does not introduce any breaking changes
  • [x] I have added screenshots or gifs to help explain the change if applicable.
  • [X] I have read the contribution guidelines.
  • [x] Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

alfonso-presa avatar Mar 07 '25 17:03 alfonso-presa

Hey @alfonso-presa, I reviewed the PR, and there are still one issue. The environment variables are not being interpolated in the response. If the Content-Type is multipart/mixed.

image

pooja-bruno avatar Mar 12 '25 12:03 pooja-bruno

@pooja-bruno , I think it's fixed now. Please let me know if this way of solving it is good (I think some other multipart content types like alternative, digest, and so can take advantage of this....) or if you'd rather see an specific execution branch for mixed content-type.

Thanks!

alfonso-presa avatar Mar 15 '25 12:03 alfonso-presa

Btw.... following my previous comment. If you'd like me to add an request.headers['content-type'].startsWith('multipart/') as an else if of the current "form-data" implementation so that it not only supports the mixed content-type, but it also does a best effort for other multipart subtypes just let me know and I'll do it right away.

alfonso-presa avatar Mar 15 '25 14:03 alfonso-presa

Thanks for the suggestion, @alfonso-presa. I like the idea of using request.headers['content-type'].startsWith('multipart/') for more general support. Please update the PR with this change. Thanks!

pooja-bruno avatar Mar 17 '25 06:03 pooja-bruno

Done @pooja-bruno! I've also done some refactor to do it more "D.R.Y". I was trying to avoid changing current core as much as possible to avoid any impact, but I think it now have sense to do it changing the current multipart/form-data code... Let me know if you agree or if I should do it in an else if fashion.

alfonso-presa avatar Mar 17 '25 08:03 alfonso-presa

May I do something or help anyway to speed up the merge of this PR? I would patiently wait anyway :-). Keep it up!

Thanks!

alfonso-presa avatar Mar 31 '25 09:03 alfonso-presa

@pooja-bruno, @Its-treason... I'm sorry to bother, I just want to ensure this has not been misplaced. Thanks!

alfonso-presa avatar May 20 '25 07:05 alfonso-presa

Hi, This PR is in the review pipeline. Thanks for your patience.

sreelakshmi-bruno avatar Jun 10 '25 16:06 sreelakshmi-bruno