Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / Util / HeaderUtility.cs / 1 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StringArrayConverter.cs
- CodeAccessPermission.cs
- SafeReversePInvokeHandle.cs
- WsdlParser.cs
- SiteMapSection.cs
- OleDbDataAdapter.cs
- OptimisticConcurrencyException.cs
- CollectionView.cs
- SpeakCompletedEventArgs.cs
- UndoUnit.cs
- HWStack.cs
- RestClientProxyHandler.cs
- EllipseGeometry.cs
- PasswordBox.cs
- TableCellCollection.cs
- AtlasWeb.Designer.cs
- ControlParameter.cs
- NetworkAddressChange.cs
- ContainerVisual.cs
- LogStore.cs
- TextRangeSerialization.cs
- ObjectDataSourceMethodEventArgs.cs
- UpWmlMobileTextWriter.cs
- ExpressionContext.cs
- ObjectStateManagerMetadata.cs
- ConfigXmlSignificantWhitespace.cs
- CoTaskMemHandle.cs
- LocalizableAttribute.cs
- MarshalDirectiveException.cs
- ClrPerspective.cs
- WithStatement.cs
- RtType.cs
- UnionCqlBlock.cs
- safex509handles.cs
- PersonalizationEntry.cs
- AuthorizationSection.cs
- XmlHierarchicalEnumerable.cs
- ClientSession.cs
- QilTargetType.cs
- ToolStripPanel.cs
- FormViewUpdateEventArgs.cs
- EdmScalarPropertyAttribute.cs
- HttpTransportSecurity.cs
- XmlWrappingReader.cs
- MenuBindingsEditorForm.cs
- SHA1Managed.cs
- DataTableReaderListener.cs
- FieldTemplateFactory.cs
- DataGridAddNewRow.cs
- ApplicationProxyInternal.cs
- BulletedList.cs
- ZipPackagePart.cs
- RequiredAttributeAttribute.cs
- ListBindingConverter.cs
- RuntimeWrappedException.cs
- WebPartEditorApplyVerb.cs
- RegionIterator.cs
- PersianCalendar.cs
- DataGridViewCellFormattingEventArgs.cs
- LocalFileSettingsProvider.cs
- FamilyTypeface.cs
- ProcessModelInfo.cs
- CFGGrammar.cs
- HostedTcpTransportManager.cs
- SqlCachedBuffer.cs
- DataGridViewMethods.cs
- FileIOPermission.cs
- ImplicitInputBrush.cs
- BlockCollection.cs
- HttpProcessUtility.cs
- HttpBindingExtension.cs
- KeyTimeConverter.cs
- BuildProvidersCompiler.cs
- Emitter.cs
- KeySplineConverter.cs
- KeyPullup.cs
- XmlCharacterData.cs
- RowToFieldTransformer.cs
- Image.cs
- SqlFacetAttribute.cs
- EventLogPermissionEntry.cs
- ZipPackage.cs
- PropertyDescriptorComparer.cs
- SiteMap.cs
- ColumnWidthChangingEvent.cs
- ClientRuntimeConfig.cs
- SymbolEqualComparer.cs
- TransferRequestHandler.cs
- ToolboxComponentsCreatedEventArgs.cs
- ClusterRegistryConfigurationProvider.cs
- Pens.cs
- SimpleWebHandlerParser.cs
- TextTreeUndoUnit.cs
- SqlDataSourceConfigureFilterForm.cs
- ProcessHostFactoryHelper.cs
- EndGetFileNameFromUserRequest.cs
- DataGridViewCellMouseEventArgs.cs
- DataGridViewCellParsingEventArgs.cs
- EncryptedReference.cs
- ISAPIRuntime.cs