The metadata is not required for a stream to function. If your data is corrupt, you are either encoding it wrong or are sending the wrong Content-Type
header.
That being said, once you get your stream working, if you would like to send metadata, this is done out-of-band of the actual audio stream. Metadata is updated with a simple HTTP request to the Icecast server.
http://icecast.example.com/admin/metadata?pass=hackme&mode=updinfo&mount=/mountpoint&song=Your%20Metadata
You can find more info in my answer here: https://stackoverflow.com/a/9985297/362536