//
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
using System.Collections;
using System.Security.Permissions;
-namespace System.Web {
-
+namespace System.Web
+{
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public sealed class HttpCacheVaryByHeaders {
-
+ public sealed class HttpCacheVaryByHeaders
+ {
/* I would have much rather seen this class just use the
* Hashtable, and have the getter/setters for the builtin
* fields just manipulate that Hashtable, but that doesn't
Hashtable fields;
- internal HttpCacheVaryByHeaders ()
+ public
+ HttpCacheVaryByHeaders ()
{
/* the field names are meant to be case insensitive */
-#if NET_2_0
fields = new Hashtable (StringComparer.InvariantCultureIgnoreCase);
-#else
- fields = new Hashtable(CaseInsensitiveHashCodeProvider.Default,
- CaseInsensitiveComparer.Default);
-#endif
}
- internal string[] GetHeaderNames ()
+ internal string[] GetHeaderNames (bool omitVaryStar)
{
string[] names;
- if (vary_by_unspecified) {
+ if (vary_by_unspecified && !omitVaryStar) {
names = new string[1];
names[0] = "*";
}