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
- MonitoringDescriptionAttribute.cs
- ProjectionPath.cs
- SettingsPropertyValueCollection.cs
- AdCreatedEventArgs.cs
- ListItemCollection.cs
- ManagedFilter.cs
- DesignerTransaction.cs
- TearOffProxy.cs
- COM2ComponentEditor.cs
- WeakEventTable.cs
- KeyNotFoundException.cs
- XPathBuilder.cs
- DispatchWrapper.cs
- MenuItemBinding.cs
- SHA1CryptoServiceProvider.cs
- EdmSchemaError.cs
- DetailsViewRow.cs
- UrlAuthFailedErrorFormatter.cs
- AuthenticatedStream.cs
- DeviceSpecificChoiceCollection.cs
- BitmapEffectDrawingContent.cs
- ProviderBase.cs
- HostProtectionPermission.cs
- CodeCommentStatement.cs
- StrongNameUtility.cs
- BidOverLoads.cs
- Manipulation.cs
- RolePrincipal.cs
- DataRowChangeEvent.cs
- ZoomPercentageConverter.cs
- WizardStepBase.cs
- DispatcherEventArgs.cs
- Environment.cs
- Exception.cs
- DefaultValueConverter.cs
- WsdlBuildProvider.cs
- EdmComplexPropertyAttribute.cs
- GrammarBuilderWildcard.cs
- CodeMemberEvent.cs
- SmiTypedGetterSetter.cs
- SetterBase.cs
- InternalControlCollection.cs
- DataGridTableCollection.cs
- SmtpReplyReader.cs
- Activity.cs
- ContainerControl.cs
- DescendantBaseQuery.cs
- KeyPullup.cs
- TypeExtension.cs
- IdentityNotMappedException.cs
- XmlSerializableWriter.cs
- RegisteredArrayDeclaration.cs
- PointLight.cs
- Console.cs
- EntityDataSourceSelectingEventArgs.cs
- NotConverter.cs
- XmlAttributes.cs
- StandardBindingCollectionElement.cs
- WebPartDisplayModeCancelEventArgs.cs
- SparseMemoryStream.cs
- FixedSOMPageConstructor.cs
- SuppressIldasmAttribute.cs
- UnsafeNativeMethods.cs
- EntityKey.cs
- StreamWithDictionary.cs
- Point3DCollection.cs
- Rights.cs
- Section.cs
- ConstraintStruct.cs
- NullPackagingPolicy.cs
- PaperSize.cs
- Stylus.cs
- PageTheme.cs
- GenericWebPart.cs
- SchemaElementDecl.cs
- SqlCacheDependency.cs
- documentation.cs
- DataGridItemCollection.cs
- ToolTipAutomationPeer.cs
- KeyedByTypeCollection.cs
- ValueChangedEventManager.cs
- CodeValidator.cs
- SpoolingTaskBase.cs
- Number.cs
- ObjectItemCollection.cs
- LineInfo.cs
- ArrayListCollectionBase.cs
- PageThemeParser.cs
- oledbmetadatacollectionnames.cs
- OdbcDataAdapter.cs
- XmlBoundElement.cs
- MultiBinding.cs
- ChangeBlockUndoRecord.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- SafeLibraryHandle.cs
- TemplateInstanceAttribute.cs
- CodeGenerator.cs
- DataGridViewRowPostPaintEventArgs.cs
- shaperfactoryquerycachekey.cs
- _ConnectOverlappedAsyncResult.cs