Re: Re: [android-developers] about HTTP Auth in DownloadManager
i tried it, but the result is same, still an extra abnormal http request happened, as below capture:
after http 200 ok, an extra abnormal http request still happened, and its user agent is androiddownloadmanager, strange
nicefuture
From: nicefuture
Date: 2012-06-15 16:01
Subject: 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
From: Nikolay Elenkov
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
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