?

Log in

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

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

Infohistory [Feb. 22nd, 2004|01:55 pm]
LiveJournal Client Discussions

lj_clients

[quirrc]
If I get it right all data returned via flat interface must be in the form key\r\n value\r\n etc. and if value contains linebreaks (like for main entry body) it is urlencoded. Infohistory console command may return multiline data like
cmd_line_2\r\n Changed password ..\r\n old value of password .. \r\n
so it contains linebreaks within the value but is not encoded.
Am I missing something or is it an error at LJ?
linkReply

Comments:
[User Picture]From: xb95
2004-02-22 10:11 am (UTC)
It returns multiple lines. You have to deal with it. With some of my Perl tools, I just created a regexp that iterates to find the appropriate lines.

You should probably just start at the top and count any line that has cmd_* as being the beginning of a section, then keep slurping data until you hit another cmd_* line, then start another section, etc.

So yes, it's annoying, but it's hardly something we can't code for. :)
(Reply) (Thread)
From: evan
2004-02-22 01:25 pm (UTC)

Re:

whoa, that's really really not good. it's possible to code around but it's definitely breaking the protocol. it may not so bad in perl but some of us parse this stuff in c. we shouldn't have to write a special-cased function just for one possible subcommand of one interface mode.
(Reply) (Parent) (Thread)