Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > need a url that its http response header that cotain 401 status code

Reply
Thread Tools

need a url that its http response header that cotain 401 status code

 
 
iMath
Guest
Posts: n/a
 
      12-26-2012
I am going to do a Basic Authentication ,
so I need a url
that its http response header that cotain 401 status code.
 
Reply With Quote
 
 
 
 
Hans Mulder
Guest
Posts: n/a
 
      12-26-2012
On 26/12/12 10:08:41, iMath wrote:
> I am going to do a Basic Authentication ,
> so I need a url
> that its http response header that cotain 401 status code.


Isn't that backwards? I mean, what's the point of implementing
Basic Authentication, unless you already know a site that uses it?

if you don't know any such site, you can set one up easily:
just run a webserver on your laptop and password-protect a page
in your server configuration.

When you've found a suitable url, take a look at HTTPBasicAuthHandler
in the urllib2 modules.


Hope this helps,

-- HansM


 
Reply With Quote
 
 
 
 
Chris Angelico
Guest
Posts: n/a
 
      12-26-2012
On Wed, Dec 26, 2012 at 8:08 PM, iMath <(E-Mail Removed)> wrote:
> I am going to do a Basic Authentication ,
> so I need a url
> that its http response header that cotain 401 status code.


Looking into my binocular crystal ball, I see two things:

Left eye: You're trying to write a basic auth client, and want
something to test it on. See Hans's response.

Right eye: You want to write a basic auth server, and you need to know
how to return a 401.

Please provide 1.5 metric tons of additional information. What are you
trying to do, what libraries are you using, what's the failing code?

ChrisA
 
Reply With Quote
 
iMath
Guest
Posts: n/a
 
      01-07-2013
在 2012年12月26日星期三UTC+8下午5时08分41 ,iMath写道:

> I am going to do a Basic Authentication ,
>
> so I need a url
>
> that its http response header that cotain 401 status code.


I solved it myself ,thanks anyway
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
The request failed with HTTP status 401: Unauthorized ad ASP .Net 2 02-18-2006 12:11 AM
The request failed with HTTP status 401: Unauthorized ad ASP .Net 0 02-17-2006 06:14 AM
The request failed with HTTP status 401: Unauthorized Sachin ASP .Net 2 11-04-2005 09:15 PM
HttpWebRequest & (401) Unauthorized http status code =?Utf-8?B?UG1jZw==?= ASP .Net 0 06-21-2004 12:55 PM



Advertisments