You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cr...@locus.apache.org on 2000/05/08 00:32:30 UTC

cvs commit: jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security HttpBasicValve.java

craigmcc    00/05/07 15:32:30

  Modified:    proposals/catalina/src/share/org/apache/tomcat/security
                        HttpBasicValve.java
  Log:
  Strict RFC compliance on the BASIC authentication challenge.
  Submitted by:	Remy Maucherat
  
  Revision  Changes    Path
  1.2       +11 -11    jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security/HttpBasicValve.java
  
  Index: HttpBasicValve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security/HttpBasicValve.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HttpBasicValve.java	2000/05/05 18:25:13	1.1
  +++ HttpBasicValve.java	2000/05/07 22:32:29	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security/HttpBasicValve.java,v 1.1 2000/05/05 18:25:13 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/05/05 18:25:13 $
  + * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security/HttpBasicValve.java,v 1.2 2000/05/07 22:32:29 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/05/07 22:32:29 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -15,7 +15,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -23,15 +23,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
    * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache"
  @@ -59,7 +59,7 @@
    *
    * [Additional notices, if required by prior licensing conditions]
    *
  - */ 
  + */
   
   
   package org.apache.tomcat.security;
  @@ -83,7 +83,7 @@
    * and Digest Access Authentication."
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/05/05 18:25:13 $
  + * @version $Revision: 1.2 $ $Date: 2000/05/07 22:32:29 $
    */
   
   public final class HttpBasicValve
  @@ -164,7 +164,7 @@
   	String realmName = config.getRealmName();
   	if (realmName == null)
   	    realmName = hreq.getServerName() + ":" + hreq.getServerPort();
  -	hres.setHeader("WWW-Authenticate", "Basic \"" + realmName + "\"");
  +	hres.setHeader("WWW-Authenticate", "Basic realm=\"" + realmName + "\"");
   	hres.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
   	hres.flushBuffer();
   	return (false);