Skip to content

Conversation

@winsock
Copy link

@winsock winsock commented Jan 11, 2021

Context

This change ensures that the proper content length is set when setting a multipart header with custom headers.

Questions

Overview

  • Use strstr to find the boundary of the body \r\n\r\n ignore if there is no valid body
  • Use the pointer found by strstr + 4(accounting for the boundary) to call strlen with to get the real size of the body. But add one to match existing behavior.

Before any custom headers set via `sip_multipart` would be included in the size calculation.
@winsock winsock changed the title [mod_sofia] Set the proper content-length for multipart messages [mod_sofia] Set the proper Content-Length for multipart messages Jan 11, 2021
@winsock
Copy link
Author

winsock commented Jan 11, 2021

Here is a packet capture of how this looks before and after:
before_and_after_pcap.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant