Anyway, I happened upon avoision.com through BoingBoing, and wasted a few hours reading through the entries. Heh, blogs that go back years and years and have a lot of entries are always fun like that. It also reminded me of my own attempts of blogging, and then returning to the entries years later to think, “Wow, I’ve forgotten about that!”
So then I thought, “I should start (re-)doing that, blogging my daily life.”. Then I thought, “But all I do is sit around and watch my life tick away.” (not really, but that’s the “executive summary”).
Anyway, today I’ve been hacking a PHP script… hey, where did everyone go? … that creates HTTP Post requests, especially multi-part requests. The post body is made as a MIME stream, with a separator string that is unique and doesn’t occur in the contents. So I created said MIME stream, sent it to the server, and the server doesn’t see it properly. After a few hours of debugging, I saw the problem.
If the boundary (i.e. separator) is “abcd”, the first part is indicated with
"--abcd", the last part is terminated with
"--abcd--". Unfortunately the boundary Firefox generates is usually something like
"------------1231231312". So two more -’s in front of that wasn’t really noticable.
Oh well, that’s the problem with not reading the specs… you FAIL.