Http Auth in a Firefox 3 bookmarklet *

Question

Im trying to create a bookmarklet for posting del.icio.us bookmarks to a seperate account.

I tested it from the command line like:

wget  -O - --no-check-certificate \
"https://seconduser:thepassword@api.del.icio.us/v1/posts/add?url=http://seet.dk&description=test"

and this works great

I then wanted to create a bookmarklet in my firefox. I googled and found bits and pieces and ended up with:

javascript:void(
    open('https://seconduser:password@api.del.icio.us/v1/posts/add?url='
          +encodeURIComponent(location.href)
          +'&description='+encodeURIComponent(document.title),
          'delicious','toolbar=no,width=500,height=250'
        )
    );

but all that happens is that i get this from del.icio.us:

<?xml version="1.0" standalone="yes"?>
<result code="access denied" />
<!-- fe04.api.del.ac4.yahoo.net uncompressed/chunked Thu Aug  7 02:02:54 PDT 2008 -->  

If I then go to the address bar and presses enter, it changes to:

<?xml version='1.0' standalone='yes'?>
<result code="done" />
<!-- fe02.api.del.ac4.yahoo.net uncompressed/chunked Thu Aug  7 02:07:45 PDT 2008 -->

Any ideas how to get it to work directly from the bookmarks?

Answer

Can you sniff the traffic to find what's actually being sent? Is it sending any auth data at all and it's incorrect or being presented in a form the server doesn't like, or is it never being sent by firefox at all?

< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/4544/" >Http Auth in a Firefox 3 bookmarklet< /a>
Share on Google Plus

About Cinema Guy

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment