Commit graph

5 commits

Author SHA1 Message Date
YuviPanda
11685e5ec1 (Bug 41703) Validate user tokens & re-login if necessary
Now we send out a request before every upload to check if
the user is logged in. If not, we re-login.

Need to study this more - this adds a little bit of extra latency
to every upload. But if the upload fails because of a login failure,
it will mean we'll have to re-upload the entire thing. Choices.

Also added a debug method to convert XML object to a String. Was
amazed at the power of Java being able to make such a complex task
accomplishable by a single line </s>
2012-11-02 23:22:29 +05:30
YuviPanda
802e6aa9ed Added Commons AccountManager (Authentication Provider!)
Also updated version of java-mwapi to support cookie based auth
2012-10-15 00:42:13 +05:30
YuviPanda
d7ad63ad38 Make uploads work with WMF wikis
They use HTTP/1.0, so no HTTP Chunked Transfer. Took me a fucklong
to actually find that out - almost 5 hours as I chased wrong leads,
looked for bugs in the HTTP libs, battled poor network, etc. But
was relatively easy to spot once I started logging HTTP requests.

Now, if only Java had a decent documentation browser...
2012-10-07 01:26:20 +05:30
YuviPanda
43d0f6a404 Add proper login flow 2012-10-06 18:37:44 +05:30
YuviPanda
6ae5282f8a Initial commit 2012-10-06 11:50:20 +05:30