talarubi: (Default)
[personal profile] talarubi
Freaking class... so close.

I found out ICS was adding Accept and Content-Type to my HTTP PUT, thusly confusing LJ. Nixed that. Then I remembered to clear the header list between requests. Ethereal is really handy. Too bad the ever-buggy Kerio doesn't like it.

So the upshot is that now I have code uploading to FotoBilder, but for some reason the MD5s on the client/server end aren't matching up. Thus the request fails. Will have to investigate later. :/

Think I'll bring some descriptions along and try to draw between classes this evening.

Date: 2005-04-14 06:23 pm (UTC)
zorkian: Icon full of binary ones and zeros in no pattern. (Default)
From: [personal profile] zorkian
The MD5 thing is probably because all Delphi MD5 libraries capitalize things, but in Perl, they're lowercased. Make sure you're doing LowerCase(md5string(foo)) in order to get lowercase. :-)

So you're making a FB client? Got any screenshots? I know we're looking for people to make clients... :)

Date: 2005-04-15 01:50 am (UTC)
From: [identity profile] draci.livejournal.com
No, it's definitely lowercase, I ran into that doing the challenge response! Challenges work fine now. Traffic dump sez:
PUT /interface/simple HTTP/1.0
Host: pics.livejournal.com
Content-Length: 8196
X-FB-User: draci
X-FB-Mode: UploadPic
X-FB-Auth: crp:...
X-FB-GetChallenge: 1
X-FB-UploadPic.MD5: 91084487020e6311a938b9b5f1e6defc
X-FB-UploadPic.ImageLength: 8196
X-FB-UploadPic.PicSec: 0

<8196 bytes JPEG>

HTTP/1.0 200 OK
Date: Fri, 15 Apr 2005 01:28:45 GMT
Server: Apache
Connection: close
Content-Type: text/xml

<FBResponse>
  <GetChallengeResponse>
    <Challenge>...<Challenge>
  </GetChallengeResponse>
  <UploadPicResponse>
    <Error code="211">Invalid argument: Supplied MD5 does not match data MD5</Error>
  </UploadPicResponse>
</FBResponse>

If you'd been reading my journal you'd have seen some screenshots. :) Since this is a drawing program, FotoBilder uploading is a side feature, to make it easier for people to get art onto LJ. Eventually, I plan to support FTP and other art sites as well--if anyone wants to cooperate.

The FB client has had half a thought put into the design for fuller protocol support (right now the upload method is to add pictures to the scrapbook and then call Sync), but as of now the only working upload UI is a debug form. If you guys want to get some real management into the protocol (or explain it to me assuming it is and just isn't documented), then actual gallery editing/reordering etc. could happen. I would like to be able to designate cropping regions like the web interface.

Maybe I'll post screens when I get upload working from the main UI.

I saw the post asking for FB clients but I got scared away by mention of contracts. Should I be braver? :)

Date: 2005-04-15 07:11 am (UTC)
zorkian: Icon full of binary ones and zeros in no pattern. (Default)
From: [personal profile] zorkian
Well, I know you prefer to work at your own pace and time, so it'd probably work better if you make it, and then I can pitch it to them and see if they'd be willing to give you some money, or something? I'm not sure what the budget is like for that sort of thing. We were looking at paying one guy to write an iPhoto plugin, but I'm not really part of that discussion, so I don't know it if happened or not... I guess that means -- no promises, but I can see what I can do, if you get a functional client going.

There aren't really any management modes except for CreateGals to create a gallery structure. You can also get the structure, but I don't think you can reorder or delete. Definitely something that could be added -- [livejournal.com profile] whitaker is pretty good about adding protocol modes that people are looking into implementing.

Glad you got the MD5 working! It seems to trip most people up, generally for the case reason, but apparently now some libraries are kinda silly in how they handle it! Funny, that.

I have to sleep now, but I'd be happy to chat sometime about what we're looking for, if you want.

*fuzz!*

Date: 2005-04-15 05:16 pm (UTC)
From: [identity profile] draci.livejournal.com
Well I'm writing this, money or no, but it would be a great side-effect. It would also make it more worthwhile, in the future, to port to Kylix (which is still free for GPL use, isn't it?).

Anyway it's Friday, so I'll be around all weekend... *yawns and shakes out sleep-and-mark-mussed mane*

Date: 2005-04-19 01:19 am (UTC)
From: [identity profile] draci.livejournal.com
In case I wasn't clear enough, I did, and do want to talk about it. I thought you'd have said something to me on AIM already, but I guess that got lost or whatever. Bug me, or let me know when? You're busier than me, so.

Date: 2005-04-19 01:26 am (UTC)
zorkian: Icon full of binary ones and zeros in no pattern. (Default)
From: [personal profile] zorkian
Did you message me on AIM? I don't recall any AIM messages... I know we were chatting briefly on Yahoo...?

Date: 2005-04-19 01:59 am (UTC)
From: [identity profile] draci.livejournal.com
Right, it was Yahoo. At least I think so. It's not much difference to me since I have them all in GAIM anyways. :)

I'll have to look back but I recall being busy with code, and thus more rambling on about my progress than about what you wanted. Hmm.

Date: 2005-04-15 03:12 am (UTC)
From: [identity profile] draci.livejournal.com
BTW, it was a picky library, I was trying to MD5 64kb streamed chunks but the final hunk gives a bad answer if you pass in more than 64 bytes.
Uploads work now!

Oops, seems the hash class I'm using doesn't store multiple values per key. :P This is a problem since I'm storing all nonuploaded pics under id 0. Guess I get to special-case that part.

Profile

talarubi: (Default)
Talarubi

January 2007

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28293031   

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 29th, 2025 06:00 pm
Powered by Dreamwidth Studios