Log in

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

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

LiveJournal not responding to XML-RPC posts [Jul. 6th, 2004|02:45 pm]
LiveJournal Client Discussions
Starting a few weeks back, using my product, The Journal, to post to LiveJournal started having problems.

I have spent the afternoon bug-hunting, and determined that it's not me. Something in LiveJournal changed, and there's been very little that I can find about what that change might've been. No updates to documentation, for example.

Here's an example of a post that worked before:

POST /interface/xmlrpc/ HTTP/1.1
User Agent: The Journal 3
Host: www.livejournal.com
Content-type: text/xml
Content-length: 119


[User Picture]From: bleything
2004-07-06 01:40 pm (UTC)
It's probably waiting for more content. For the request you specify, the content length should be 22 or so. Plus, "User-Agent" should be hyphenated, but that could just be something else.
(Reply) (Thread)
[User Picture]From: thevoicewithin
2004-07-06 01:41 pm (UTC)
I don't know about your case, but the Livejournal Bots page states:

All bots are required to have a well-formed user agent which includes a contact email address for the bot maintainer, and preferrably a URL to the organization running the bot. Bots without this information have a higher chance of being blocked.

According to your post, you do not have a well-formed user agent according to LJ's specifications.
(Reply) (Thread)
From: davidrm
2004-07-06 01:51 pm (UTC)
Well...The Journal isn't a bot...but I'm game to try anything at this point. It didn't help, BTW.

A minor correction on the example POST above: It normally is "HTTP/1.0". I had tried 1.1 to see if it would make a different (it didn't), so I've switched back.

And, yes, there is some XML that doesn't show up. I guess I didn't escape it properly.

When I try to type in the POST via telnet, the connection closes on me as soon as I give the content-length and hit ENTER.


(Reply) (Parent) (Thread)
[User Picture]From: marksmith
2004-07-06 01:58 pm (UTC)
That's because you have User Agent and it should be User-Agent.

Also, all clients are bots. All bots are clients. Any program you write that accesses our servers is considered a bot. Please follow the instructions in the bots page linked above, including having a good user-agent. Thanks. :)
(Reply) (Parent) (Thread)
From: davidrm
2004-07-06 03:05 pm (UTC)
Odd about the user agent. It'd worked that way for more than 6 months...

I have updated the user agent, and then puzzled out the MD5 hashing for the challenge/response stuff for an encore. So I'm good to go again. And my users will be as soon as I roll out the fix.

Thanks for the help.

(Reply) (Parent) (Thread)
[User Picture]From: marksmith
2004-07-06 03:07 pm (UTC)
Yes, this is a recent change on our end. The HTTP specification is very specific about what is allowed to be part of headers, and spaces are not allowed to the left of the initial colon.

Best of luck!
(Reply) (Parent) (Thread)
[User Picture]From: bleything
2004-07-06 01:43 pm (UTC)
It occurs to me that your request probably contains a bunch of XML as well, but is unescaped in the post (and therefore invisible). So ignore my comment about content length for now :)
(Reply) (Thread)