2008/6/6 todd <t...@possibility.com>:
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
--
Johan Carlsson
Colliberty Easy Publisher
http://www.easypublisher.com
> On Apr 9, 2007, at 2:12 PM, rag wrote:
> "Sorry, due to abusive behaviour, we have been forced to disable
> posting from external websites. If you are posting from an API tool,
> please ensure that the HTTP_REFERER header is not set."
So it seems like your not allowed to post to twitter from external web sites.
Looking at urlfetch.py, I'm wondering if it would be possible to
override the fetch
function (e.g. roll your own) and intercept the request after it's
been generated
from urlfetch_service_pb.URLFetchRequest(), assuming it is URLFetchRequest()
that addes the unwanted headers. (Just a wild idea, if you try it let me know).
/Johan
You can - you just can't set the HTTP_REFERER. i.e. any request with
it set is blocked.
> Looking at urlfetch.py, I'm wondering if it would be possible to
> override the fetch
> function (e.g. roll your own) and intercept the request after it's
> been generated
> from urlfetch_service_pb.URLFetchRequest(), assuming it is URLFetchRequest()
> that addes the unwanted headers. (Just a wild idea, if you try it let me know).
urlfetch isn't setting the referer header AFAIK - its a separate proxy
doing that.
FWIW here's the twitter thread about this mandatory no referer header
policy - AFAIK its some security issue that made them add this
restriction.
http://groups.google.com/group/twitter-development-talk/browse_thread/thread/5576e58b88af7b82/1440d1216719b2bb#1440d1216719b2bb
According to this thread...
http://groups.google.com/group/twitter-development-talk/browse_thread/thread/ebf637d1ea971247/bb8c1c9c23901ecb?lnk=gst&q=referer#bb8c1c9c23901ecb
it might be that setting Referer to a string that starts with
"app-resource:/" we might be able to post to twitter from app engine.
I wonder is there some secret ninja header we could set to avoid the
appengine http proxy zapping the Referer header and shoving in the
"http://*.appspot.com/ value?
It'd be very handy to be able to post to twitter from app engine!
As for twitter this restriction is probably in place so they don't get
floddded with spammers using open proxies.