Tags: +patch

There were at least three issues:
  1) memory allocation for the first set of headers was off.
  2) The original problem reported of a lack of a blank line after the
     headers.
  3) The Content-Length header line output included a trailing null,
     which effectively becomes part of the picture data.


194c194
<                                               2 + strlen( CONTENT_TYPE ) );
---
>                                               7 + strlen( CONTENT_TYPE ) );
196c196
<         sprintf( psz_separator_block, "%s\r\n%s\r\n", psz_separator,
---
>         sprintf( psz_separator_block, "%s\r\n%s\r\n\r\n", psz_separator,
214d213
<         block_t *p_length = block_New( p_mux, 25 );
221c220,221
<         memcpy( p_length->p_buffer, psz_content_length, 25 );
---
>         block_t *p_length = block_New( p_mux, strlen(psz_content_length) );
>         memcpy( p_length->p_buffer, psz_content_length, p_length->i_buffer );
-- 
Rob

Attachment: signature.asc
Description: Digital signature

Reply via email to