Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9161067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:53:05+00:00 2026-06-17T13:53:05+00:00

I would like to have a site where some content is public while some

  • 0

I would like to have a site where some content is public while some other is only visible for authenticated users. So authentication would be possible, but not required. I would like to know if this is possible.

Some background:

To tell the client authentication is available in the first place I need to send some headers. As I understand RFC 2617 the ‘WWW-Authenticate’ header field MUST always be part of a ‘401 (Unauthorized)’ response.

Now some clients (e.g. wget) will stop trying when they get a 401 header (wget actually uses the term ‘Authorization Required’ rather than ‘Unauthorized’).

So is this a wget bug or is there no such thing as optional http basic auth?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:53:06+00:00Added an answer on June 17, 2026 at 1:53 pm

    401 Unauthorized is specifically for when authorization is required but not provided (or not provided correctly.

    In your scenario, you’d only send the WWW-Authenticate header for requests that require authentication – if the auth is cancelled or not satisfactory, you then return 401.

    Users would not be prompted to auth until making a request that requires it. No requests have optional authentication – the request is either allowed to anonymous users or not.

    It’s worth noting that HTTP auth is a bad choice for website logins, for a few reasons:

    • there is no concept of logging out
    • authentication details are sent in plain text (unless over SSL)
    • the interface/UX cannot be amended
    • there is no such thing as a password reminder, self-registration, minimum password requirements etc

    HTTP auth comes from an era when sites were static, so security was dealt with at a webserver level.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to have my site’s logo shown in the icon area of
I have one web site in IIS, and I would like to have version
i would like to have a block on my drupal site(latest version) that displays
I would like to have external proofreaders to work directly inside my Drupal site.
I would like to ask you: Imagine that you have a site and there
I have a site that supports localization. I would like to be able to
I'm building a HTML template for my site and would like to have a
I have a web site and a web service and I would like to
Hiiii I have a jQtouch site in dev and i would like to use
I have articles on my site, and I would like to add tags which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.