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

Discussion in 'Python' started by iMath, Dec 26, 2012.

  1. iMath

    iMath Guest

    I am going to do a Basic Authentication ,
    so I need a url
    that its http response header that cotain 401 status code.
     
    iMath, Dec 26, 2012
    #1
    1. Advertising

  2. iMath

    Hans Mulder Guest

    Re: need a url that its http response header that cotain 401 statuscode

    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
     
    Hans Mulder, Dec 26, 2012
    #2
    1. Advertising

  3. Re: need a url that its http response header that cotain 401 statuscode

    On Wed, Dec 26, 2012 at 8:08 PM, 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.


    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
     
    Chris Angelico, Dec 26, 2012
    #3
  4. iMath

    iMath Guest

    在 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 :)
     
    iMath, Jan 7, 2013
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UG1jZw==?=

    HttpWebRequest & (401) Unauthorized http status code

    =?Utf-8?B?UG1jZw==?=, Jun 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    2,452
    =?Utf-8?B?UG1jZw==?=
    Jun 21, 2004
  2. Sachin
    Replies:
    2
    Views:
    17,970
    Sachin
    Nov 4, 2005
  3. ad
    Replies:
    2
    Views:
    13,574
  4. ad
    Replies:
    0
    Views:
    1,636
  5. Raterus

    WebClient + Credentials + HTTP 401 Status Codes

    Raterus, Feb 9, 2005, in forum: ASP .Net Security
    Replies:
    5
    Views:
    381
    Joe Kaplan \(MVP - ADSI\)
    Feb 10, 2005
Loading...

Share This Page