?

Log in

No account? Create an account
Handshaking - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Handshaking [Dec. 27th, 2004|01:00 am]
LiveJournal Client Discussions

lj_clients

[cesareborgia]
Sorry for the very _dumb_ question, but I'm almost not familiar with net-programming and programming for lj. =( However, should produce simple application for posting to lj.. So now I'm stuck on the very first step:
if I send somthing like:
POST /interface/flat HTTP/1.0
Host: www.livejournal.com
Content-type: application/x-www-form-urlencoded
Content-length: TESTLENGTH

mode=login&user=TESTUSER&password=TESTPASSOWRD
//no challenge. just need to check the principle..

I get responce message:
errmsg
Client error: No mode specified.

The same thing with any post mode I tried (postevent etc)
So.. what is wrong with the mode? =/
linkReply

Comments:
[User Picture]From: hythloday
2004-12-27 01:15 pm (UTC)
When I set the Content-Length header to 46 (which is the length of "mode=login&user=TESTUSER&password=TESTPASSOWRD"), I get this:
HTTP/1.0 200 OK
Date: Mon, 27 Dec 2004 13:12:59 GMT
Server: Apache
Set-Cookie: ljuniq=Bfdtt1GCZvGyAed:1104153179; expires=Friday, 25-Feb-2005 13:12:59 GMT; domain=.livejournal.com; path=/
Content-length: 37
Connection: close
Content-Type: text/plain

errmsg
Invalid password
success
FAIL


Which I think is what you want.
(Reply) (Thread)
[User Picture]From: cesareborgia
2004-12-27 02:59 pm (UTC)
thanks for the reply,
the problem occured to be even more stupid. Just one unnecessary string was transmitted.
(Reply) (Parent) (Thread)