Friday, June 15, 2012

Re: Re: [android-developers] about HTTP Auth in DownloadManager

You probably need to add the proper (basic) authentication header using the
addRequestHeader() for this to work:
 
does it only affect the next download session, will it affect all the download session?
 
btw, is basic scheme api available in android?
 

nicefuture
 
Date: 2012-06-15 15:30
Subject: Re: [android-developers] about HTTP Auth in DownloadManager
On Fri, Jun 15, 2012 at 4:17 PM, nicefuture <nicefuture@126.com> wrote:
 
>
> Then, I tried to implement the http authentication in my application, BUT
> I failed, I found the behavior is very strange, below is the step:
>
>
>
> 1.牋牋牋 I already know the website抯 userid and password, I tested using
> the path contain userinfo, as below:
>
> http://tma:nokiatma@bewww05.wirelessfuture.com/Onlinetest/download/To_Content/descriptors/audio/dd_audio_mp4.dd
>
>
> 2.牋牋牋 In my guess, the Download Manager should work well, and status
> 200 should be reported. BUT, still status 401 is reported. And from the
> tcpdump, it is very strange, it obviously successfully be authenticated and
> retrieve the content, but then the client start a new http get, which cause
> to the status 401 occurred.牋 I wonder why the extra http get procedure
> happened??
>
 
You probably need to add the proper (basic) authentication header using the
addRequestHeader() for this to work:
 
http://developer.android.com/reference/android/app/DownloadManager.Request.html#addRequestHeader(java.lang.String,
java.lang.String)
 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate