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
- HoistedLocals.cs
- SQLByteStorage.cs
- SecurityManager.cs
- FontStretches.cs
- IdnElement.cs
- TextHidden.cs
- ElapsedEventArgs.cs
- ConfigUtil.cs
- CookieProtection.cs
- SafeLocalAllocation.cs
- RotateTransform.cs
- ReferencedAssembly.cs
- WorkflowInstanceSuspendedRecord.cs
- ReadOnlyCollection.cs
- XmlDomTextWriter.cs
- HierarchicalDataTemplate.cs
- IsolationInterop.cs
- DataBoundControlAdapter.cs
- CacheDependency.cs
- RequestCacheEntry.cs
- WinEventQueueItem.cs
- BlurBitmapEffect.cs
- RuntimeHandles.cs
- ImageSource.cs
- RegexCapture.cs
- PermissionToken.cs
- TimeSpan.cs
- XmlDataImplementation.cs
- BrushValueSerializer.cs
- SqlServices.cs
- IteratorDescriptor.cs
- ExtenderProviderService.cs
- DbDataAdapter.cs
- LabelExpression.cs
- PeerEndPoint.cs
- MatchingStyle.cs
- AsymmetricSecurityProtocolFactory.cs
- ClientConvert.cs
- FixedSOMSemanticBox.cs
- ListViewDeletedEventArgs.cs
- xmlglyphRunInfo.cs
- AesCryptoServiceProvider.cs
- StaticSiteMapProvider.cs
- ConsumerConnectionPointCollection.cs
- ProcessHostMapPath.cs
- QueryStringConverter.cs
- UnicastIPAddressInformationCollection.cs
- ConfigurationSettings.cs
- securestring.cs
- HashStream.cs
- MarginCollapsingState.cs
- HitTestResult.cs
- PageHandlerFactory.cs
- ProviderBase.cs
- PrinterSettings.cs
- PointAnimationUsingPath.cs
- MultipleViewPattern.cs
- Function.cs
- DefaultBindingPropertyAttribute.cs
- LoopExpression.cs
- ConfigXmlText.cs
- HwndSourceParameters.cs
- GCHandleCookieTable.cs
- ListViewItemMouseHoverEvent.cs
- FtpWebResponse.cs
- TreeView.cs
- WebPartManagerInternals.cs
- XmlDocumentType.cs
- COM2FontConverter.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- GeneralTransform2DTo3DTo2D.cs
- X509ChainPolicy.cs
- Update.cs
- ResourceReferenceExpression.cs
- LongPath.cs
- GlyphRunDrawing.cs
- FixedSOMTextRun.cs
- SecurityContext.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- SortKey.cs
- MenuTracker.cs
- WindowsImpersonationContext.cs
- MSG.cs
- AncestorChangedEventArgs.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- ControlDesignerState.cs
- ExceptionWrapper.cs
- Container.cs
- DatatypeImplementation.cs
- TextAction.cs
- WebPartConnection.cs
- OleDbRowUpdatedEvent.cs
- GenericEnumConverter.cs
- _WebProxyDataBuilder.cs
- KnownTypesHelper.cs
- SecureUICommand.cs
- SystemInfo.cs
- HandlerBase.cs
- DataService.cs
- CodeArrayCreateExpression.cs