Oh No, A Diary!

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.

Aarrgghhh!!!!

Oh well, that’s the problem with not reading the specs… you FAIL.

About these ads

0 Responses to “Oh No, A Diary!”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s





Follow

Get every new post delivered to your Inbox.

%d bloggers like this: