Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / Util / HeaderUtility.cs / 1305376 / HeaderUtility.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Util { using System; internal static class HeaderUtility { public static bool IsEncodingInAcceptList(string acceptEncodingHeader, string expectedEncoding) { if (String.IsNullOrEmpty(acceptEncodingHeader)) { return false; } foreach (string encoding in acceptEncodingHeader.Split(',')) { string e = encoding.Trim(); // This code will typically handle all existing browsers, which // use "encoding1, encoding2" for this header. // IE, Firefox and Safari are sending "gzip, deflate" // Opera is sending "deflate, gzip, x-gzip, identity, *;q=0" // There is a currently hypothetical case where a browser would use the quantified syntax // on specific encodings ("encoding1;q=0.8, encoding2 ;q=0.2") which we don't handle here. // For those situations, the browser would get the uncompressed version. // See RFC 2068 for details. if (String.Equals(e, expectedEncoding, StringComparison.Ordinal)) { return true; } } // no match found return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Verify.cs
- AggregateNode.cs
- WindowsListViewGroup.cs
- EventListener.cs
- DirectoryLocalQuery.cs
- ByteStack.cs
- GenericArgumentsUpdater.cs
- WebConfigurationManager.cs
- LinqDataSource.cs
- PageRanges.cs
- Rect3DConverter.cs
- ExceptionHelpers.cs
- VScrollBar.cs
- CompensatableTransactionScopeActivity.cs
- CompositeDataBoundControl.cs
- SafeNativeMethods.cs
- EdmFunction.cs
- SqlProviderUtilities.cs
- DynamicDocumentPaginator.cs
- Avt.cs
- CalendarDateRangeChangingEventArgs.cs
- VerifyHashRequest.cs
- ProfileSettingsCollection.cs
- SrgsRuleRef.cs
- BeginStoryboard.cs
- SchemaInfo.cs
- NamedElement.cs
- DataRecordInternal.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ChtmlCommandAdapter.cs
- httpapplicationstate.cs
- Helper.cs
- MailHeaderInfo.cs
- ClassHandlersStore.cs
- RichTextBoxAutomationPeer.cs
- ExtendedTransformFactory.cs
- QueryOpeningEnumerator.cs
- SpanIndex.cs
- ButtonBase.cs
- TemplateContent.cs
- IdentityModelStringsVersion1.cs
- _CookieModule.cs
- WindowsTab.cs
- InvalidCastException.cs
- HandleCollector.cs
- XmlSerializerAssemblyAttribute.cs
- InertiaTranslationBehavior.cs
- HttpCookieCollection.cs
- TextViewBase.cs
- ElementMarkupObject.cs
- PersistenceTypeAttribute.cs
- CommandSet.cs
- CodeMemberProperty.cs
- AppLevelCompilationSectionCache.cs
- SortedList.cs
- DataListItemEventArgs.cs
- COM2TypeInfoProcessor.cs
- InternalConfigRoot.cs
- KerberosReceiverSecurityToken.cs
- FixedPage.cs
- ActiveXContainer.cs
- objectresult_tresulttype.cs
- AsyncPostBackTrigger.cs
- XmlSchemaGroupRef.cs
- TargetParameterCountException.cs
- DesignerSerializerAttribute.cs
- SafeFileMappingHandle.cs
- HtmlSelect.cs
- Shape.cs
- EmptyControlCollection.cs
- WebResponse.cs
- TreeIterator.cs
- _ScatterGatherBuffers.cs
- IIS7WorkerRequest.cs
- querybuilder.cs
- StorageBasedPackageProperties.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- SqlFactory.cs
- LogEntryHeaderv1Deserializer.cs
- ReadOnlyHierarchicalDataSource.cs
- EntityKeyElement.cs
- SrgsText.cs
- CryptoApi.cs
- BuildManager.cs
- _ConnectionGroup.cs
- ClientRoleProvider.cs
- XmlSchemaComplexContent.cs
- ServiceContractListItem.cs
- Propagator.JoinPropagator.cs
- UdpDiscoveryMessageFilter.cs
- ReflectionUtil.cs
- TextTreeTextNode.cs
- StorageComplexTypeMapping.cs
- TextDecorationCollection.cs
- TransactionFlowBindingElement.cs
- DynamicResourceExtension.cs
- AdPostCacheSubstitution.cs
- HttpRuntimeSection.cs
- SizeConverter.cs
- CheckoutException.cs