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

I

iMath

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

Hans Mulder

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
 
C

Chris Angelico

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
 
I

iMath

在 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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top