Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / HttpResponseHeader.cs / 1305376 / HttpResponseHeader.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * Single http header representation * * Copyright (c) 1998 Microsoft Corporation */ namespace System.Web { using System; using System.Web.Util; /* * Response header (either known or unknown) */ [Serializable] internal class HttpResponseHeader { private String _unknownHeader; private int _knownHeaderIndex; private String _value; internal HttpResponseHeader(int knownHeaderIndex, String value) : this(knownHeaderIndex, value, HttpRuntime.EnableHeaderChecking) { } internal HttpResponseHeader(int knownHeaderIndex, string value, bool enableHeaderChecking) { _unknownHeader = null; _knownHeaderIndex = knownHeaderIndex; // encode header value if if (enableHeaderChecking) { string encodedName; // unused HttpEncoder.Current.HeaderNameValueEncode(Name, value, out encodedName, out _value); } else { _value = value; } } internal HttpResponseHeader(String unknownHeader, String value) : this(unknownHeader, value, HttpRuntime.EnableHeaderChecking) { } internal HttpResponseHeader(string unknownHeader, string value, bool enableHeaderChecking) { if (enableHeaderChecking) { HttpEncoder.Current.HeaderNameValueEncode(unknownHeader, value, out _unknownHeader, out _value); _knownHeaderIndex = HttpWorkerRequest.GetKnownResponseHeaderIndex(_unknownHeader); } else { _unknownHeader = unknownHeader; _knownHeaderIndex = HttpWorkerRequest.GetKnownResponseHeaderIndex(_unknownHeader); _value = value; } } internal String Name { get { if (_unknownHeader != null) return _unknownHeader; else return HttpWorkerRequest.GetKnownResponseHeaderName(_knownHeaderIndex); } } internal String Value { get { return _value; } } internal void Send(HttpWorkerRequest wr) { if (_knownHeaderIndex >= 0) wr.SendKnownResponseHeader(_knownHeaderIndex, _value); else wr.SendUnknownResponseHeader(_unknownHeader, _value); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * Single http header representation * * Copyright (c) 1998 Microsoft Corporation */ namespace System.Web { using System; using System.Web.Util; /* * Response header (either known or unknown) */ [Serializable] internal class HttpResponseHeader { private String _unknownHeader; private int _knownHeaderIndex; private String _value; internal HttpResponseHeader(int knownHeaderIndex, String value) : this(knownHeaderIndex, value, HttpRuntime.EnableHeaderChecking) { } internal HttpResponseHeader(int knownHeaderIndex, string value, bool enableHeaderChecking) { _unknownHeader = null; _knownHeaderIndex = knownHeaderIndex; // encode header value if if (enableHeaderChecking) { string encodedName; // unused HttpEncoder.Current.HeaderNameValueEncode(Name, value, out encodedName, out _value); } else { _value = value; } } internal HttpResponseHeader(String unknownHeader, String value) : this(unknownHeader, value, HttpRuntime.EnableHeaderChecking) { } internal HttpResponseHeader(string unknownHeader, string value, bool enableHeaderChecking) { if (enableHeaderChecking) { HttpEncoder.Current.HeaderNameValueEncode(unknownHeader, value, out _unknownHeader, out _value); _knownHeaderIndex = HttpWorkerRequest.GetKnownResponseHeaderIndex(_unknownHeader); } else { _unknownHeader = unknownHeader; _knownHeaderIndex = HttpWorkerRequest.GetKnownResponseHeaderIndex(_unknownHeader); _value = value; } } internal String Name { get { if (_unknownHeader != null) return _unknownHeader; else return HttpWorkerRequest.GetKnownResponseHeaderName(_knownHeaderIndex); } } internal String Value { get { return _value; } } internal void Send(HttpWorkerRequest wr) { if (_knownHeaderIndex >= 0) wr.SendKnownResponseHeader(_knownHeaderIndex, _value); else wr.SendUnknownResponseHeader(_unknownHeader, _value); } } } // 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
- ZipIOExtraFieldZip64Element.cs
- ProtectedConfiguration.cs
- _CookieModule.cs
- XPathDocumentNavigator.cs
- TextAutomationPeer.cs
- figurelengthconverter.cs
- SecurityTokenAttachmentMode.cs
- DataGrid.cs
- TryCatch.cs
- SemanticAnalyzer.cs
- WorkflowTraceTransfer.cs
- IdleTimeoutMonitor.cs
- JsonQNameDataContract.cs
- Evidence.cs
- HtmlAnchor.cs
- ImmutableObjectAttribute.cs
- PageCodeDomTreeGenerator.cs
- SqlXmlStorage.cs
- SQLByteStorage.cs
- SystemIPv4InterfaceProperties.cs
- FrameworkContextData.cs
- ApplicationHost.cs
- FrameworkTemplate.cs
- Selection.cs
- OptimalTextSource.cs
- EventLogStatus.cs
- EncryptedXml.cs
- SecurityCriticalDataForSet.cs
- QuerySettings.cs
- Point3D.cs
- BinaryCommonClasses.cs
- ObjectSecurity.cs
- XmlArrayItemAttribute.cs
- PairComparer.cs
- SystemTcpStatistics.cs
- EventManager.cs
- UnsafeNativeMethods.cs
- SerialStream.cs
- TypeCodeDomSerializer.cs
- SqlParameterizer.cs
- Byte.cs
- UseAttributeSetsAction.cs
- PageParserFilter.cs
- AxisAngleRotation3D.cs
- HttpCachePolicyElement.cs
- QueryAccessibilityHelpEvent.cs
- DragDrop.cs
- RightsManagementEncryptedStream.cs
- XPathAncestorIterator.cs
- HybridDictionary.cs
- TabOrder.cs
- SelectionBorderGlyph.cs
- LayoutExceptionEventArgs.cs
- ShaderRenderModeValidation.cs
- InfiniteIntConverter.cs
- ValidationEventArgs.cs
- SupportingTokenProviderSpecification.cs
- LinkButton.cs
- SecurityElement.cs
- CalendarDataBindingHandler.cs
- QilInvokeEarlyBound.cs
- Point3DAnimation.cs
- XhtmlBasicCalendarAdapter.cs
- AlphabeticalEnumConverter.cs
- ColorTranslator.cs
- XmlBindingWorker.cs
- XPathNodeList.cs
- TabItemAutomationPeer.cs
- CodeTryCatchFinallyStatement.cs
- ItemType.cs
- ColumnCollection.cs
- Bidi.cs
- FormViewUpdatedEventArgs.cs
- AuthenticationManager.cs
- StringAnimationUsingKeyFrames.cs
- regiisutil.cs
- MenuRenderer.cs
- DefaultPrintController.cs
- CroppedBitmap.cs
- EntityDataSourceDesigner.cs
- XPathParser.cs
- XomlSerializationHelpers.cs
- SignatureHelper.cs
- FormsAuthenticationCredentials.cs
- DataGridAddNewRow.cs
- DashStyles.cs
- CodeIdentifier.cs
- BinaryWriter.cs
- Triangle.cs
- XmlUrlResolver.cs
- CatalogPartChrome.cs
- FixedDocumentSequencePaginator.cs
- ProtocolsInstallComponent.cs
- DataGridRelationshipRow.cs
- MarkupExtensionParser.cs
- FindCriteriaApril2005.cs
- ControlCollection.cs
- SecurityContext.cs
- DataServiceKeyAttribute.cs
- MetadataArtifactLoaderCompositeFile.cs