December 24th, 2013, 08:15 PM
Does setting headers conflictwith sending binary?
I am writing an ASP script that sends mp3 binary information to a player. In order for the player to get a grip on what is coming I want to send a CONTENT-LENGTH header. Problem is, when I do this it causes the page to be called again right before sending the binary data. Setting CONTENT-TYPE doesn't cause this but CONTENT-LENGTH does. What is going on?
This is an issue for me because I am trying to prevent saving or downloading of the mp3. My ASP script checks a parameter against a Session cookie created seconds ago from XMLHTTP. The file is too big for the buffer, so I loop though it and send it in chunks. I must cancel the Session, for otherwise the site is unresponsive to the user. When the client tries to re-access the page with the session already gone, he can't get the mp3 data.
December 27th, 2013, 02:13 AM