Maximum length of url in winamp
Winamp currently has a maximum string length of 260 for urls that point to
streaming audio. After I finally got the streaming
to work, I wanted to encrypt the querystring, so users couldn’t mess with
the url. After using the encryption, I kept getting a bunch of errors,
most of them were ”Invalid length for a base 64 char array.” So I
naturally assumed that my encryption was getting a little goofed up because of
the browser url encoding the string. So I messed around with some diffent
encryption types, but nothing worked.
Then I noticed that the url in winamp was different from the
one that I was initially sending to the user, it was truncated. Only then
did I do some digging and find that winamp uses the MAX_PATH variable in the windows
api headers, which is set to 260. This really sucks, because winamp
handles streams much better than Window Media Player, because you can set the
default action to “enqueue” rather than “clear my playlist and play the new
stream”, also, WMP doesn’t seem to read the track names correctly, so instead of
a playlist that has my list of songs, it just has the word “Play” for every
track, not real easy to tell whats playing next.
Well, at least now I know that it wasn’t something that I
did wrong, but I guess I should have verified the url before wasting all
that time…..