Hi again.
I have another problem at this part, maybe you can help me in this too.
Now the content of the file is received correctly, but the browser doesn`t want to recognize the type of the media.
Now I`m trying to send the content of an mp3 file with these headers:
Code:
write(client, "HTTP/1.0 200 OK\r\n",strlen("HTTP/1.0 200 OK\r\n"));
write(client, "Connection: close, close\r\n",strlen("Connection: close, close\r\n"));
write(client, "Server: My stream server\r\n",strlen("Server: My stream server\r\n"));
write(client, "Content-Type: audio/mpeg\r\n",strlen( "Content-Type: audio/mpeg\r\n"));
write(client, "Content-Range: bytes 0-16379980/16379980\r\n",strlen("Content-Range: bytes 0-16379980/16379980\r\n"));
write(client, "Content-length:16379980\r\n",strlen("Content-length:16379980\r\n"));
I installed an http header monitor, and as I see, the browser doesn`t receive any of these headers, or ignores them. Am I missing something?
If you could help me with this thing too, it would be great.
Thank you.
P.S. I took these headers from Gnump3d, and there it works, but not in my application.