[twitter-dev] Anyone updated jmathai OAuth library for 301s?

2009-08-31 Thread davidddn

Has anyone updated the Jaisen Mathai OAuth library to support manually
following the 301s?  Since FOLLOW_LOCATION doesn't work on POSTs, the
library needs to be re-written in parts to manually follow the
redirects.

Don't want to duplicate the work if someone has done it.

The code is here: https://github.com/jmathai/twitter-async/tree


[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread davidddn

On Sep 1, 5:00 pm, jmathai  wrote:
> I'm reconsidering adding support for POSTs.  What's the usecase
> exactly?  Does Twitter 302 POST requests?  If so, what's gained by the
> application if it follows that?

Unless I am mistaken Twitter is still doing the 302 on POST as a
countermeasure for their DDoS problem.

It's not that anything is gained, it's that the library doesn't work
without it.


[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread davidddn

On Sep 1, 6:41 pm, jmathai  wrote:
> That's a valid point.  What do you think of following on GETs and
> throwing an exception for POSTs?  Not sure many people like to deal
> with exceptions (I prefer them).

It would be helpful if someone from Twitter or who has done some
extensive testing of the 302 behavior could chime in.

IF re-trying the request after NOT following a 302 on a POST doesn't
bypass the DDoS countermeasure than throwing an exception is
completely useless.  IF re-trying the request after encountering a 302
DOES work, than throwing an exception would be sufficient to solve the
problem.

Personally I'd rather just see the library follow the 301/302 on POST
and GET, but I can see where throwing an exception would be the more
"compliant" approach.

Can someone chime in on this please?