The SendAcceptEncodingHeader property gets or sets a Boolean value that indicates whether ISA Server sends the original Accept-Encoding header received from the client to the published server.
HRESULT get_SendAcceptEncodingHeader( VARIANT_BOOL* pfSendAcceptEncodingHeader ); HRESULT put_SendAcceptEncodingHeader( VARIANT_BOOL fSendAcceptEncodingHeader );
Parameters
- pfSendAcceptEncodingHeader
- Pointer to a Boolean variable that is set on return to VARIANT_TRUE if ISA Server sends the original Accept-Encoding header received from the client to the published server, or to VARIANT_FALSE if ISA Server deletes any Accept-Encoding header supplied by the client from the request forwarded to the published server.
- fSendAcceptEncodingHeader
- Boolean value that indicates whether ISA Server sends the original Accept-Encoding header received from the client to the published server.
Return Values
These property methods return S_OK if the call is successful; otherwise, they return an error code.Remarks
This property is read/write. Its default value is VARIANT_FALSE for an ordinary Web publishing rule and VARIANT_TRUE for an Outlook Web Access publishing rule created using the Mail Publishing Rule Wizard (to allow the transmission of e-mail messages with compressed attachments).
If a Web publishing rule allows the ISA Server computer to forward Accept-Encoding headers from clients to a Web server and a client sends an Accept-Encoding header indicating that it will accept compressed content, the Web server may send a compressed response (as indicated by its Content-Encoding header), which will be accepted by the ISA Server computer and forwarded to the client. However, the ISA Server computer will not inspect or cache the compressed content.
If a Web publishing rule instructs the ISA Server computer to delete all Accept-Encoding headers from requests sent to the Web server (the default setting) and the Web server nevertheless sends a compressed response, the ISA Server computer will not forward the response to the client.
In the forward proxy scenario, Accept-Encoding headers are always removed from client requests allowed by access rules.
In ISA Server 2006 and ISA Server 2004 Service Pack 2, the value of this property is considered only if the Compression Filter and Caching Compressed Content Filter are disabled. If these Web filters are enabled and are configured to forward requests for compressed content to the published server, ISA Server ignores this property and forwards Accept-Encoding headers that specify gzip encoding from clients to the published server, or adds an Accept-Encoding: gzip header to requests that do not contain this header before forwarding them to the published server. If these Web filters are enabled, but are not configured to forward requests for compressed content to the published server, ISA Server ignores this property and deletes any Accept-Encoding header supplied by a client from requests forwarded to the published server.
The SendAcceptEncodingHeader property gets or sets a Boolean value that indicates whether ISA Server sends the original Accept-Encoding header received from the client to the published server.
Property SendAcceptEncodingHeader As Boolean
Property Value
Boolean value that indicates whether ISA Server sends the original Accept-Encoding header received from the client to the published server.Remarks
This property is read/write. Its default value is False for an ordinary Web publishing rule and True for an Outlook Web Access publishing rule created using the Mail Publishing Rule Wizard (to allow the transmission of e-mail messages with compressed attachments).
If a Web publishing rule allows the ISA Server computer to forward Accept-Encoding headers from clients to a Web server and a client sends an Accept-Encoding header indicating that it will accept compressed content, the Web server may send a compressed response (as indicated by its Content-Encoding header), which will be accepted by the ISA Server computer and forwarded to the client. However, the ISA Server computer will not inspect or cache the compressed content.
If a Web publishing rule instructs the ISA Server computer to delete all Accept-Encoding headers from requests sent to the Web server (the default setting) and the Web server nevertheless sends a compressed response, the ISA Server computer will not forward the response to the client.
In the forward proxy scenario, Accept-Encoding headers are always removed from client requests allowed by access rules.
In ISA Server 2006 and ISA Server 2004 Service Pack 2, the value of this property is considered only if the Compression Filter and Caching Compressed Content Filter are disabled. If these Web filters are enabled and are configured to forward requests for compressed content to the published server, ISA Server ignores this property and forwards Accept-Encoding headers that specify gzip encoding from clients to the published server, or adds an Accept-Encoding: gzip header to requests that do not contain this header before forwarding them to the published server. If these Web filters are enabled, but are not configured to forward requests for compressed content to the published server, ISA Server ignores this property and deletes any Accept-Encoding header supplied by a client from requests forwarded to the published server.
Example Code
This VBScript script sets the SendAcceptEncodingHeader property to True for the specified Web publishing rule on the local ISA Server computer to allow the ISA Server computer to forward compressed content from the Web server to Web proxy clients.
'Define the constants needed
const Error_FileNotFound = &H80070002
Const fpcPolicyWebPublishing = 2
Main(WScript.Arguments)
Sub Main(args)
If(args.Count = 1) Then
AllowCompressedContent args(0)
Else
Usage()
End If
End Sub
Sub AllowCompressedContent(ruleName)
' Create the root object.
Dim root ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
' Declare the other objects needed.
Dim isaArray ' An FPCArray object
Dim rule ' An FPCPolicyRule object
' Get a reference to the array object.
Set isaArray = root.GetContainingArray()
' Get a reference to the policy rule specified.
On Error Resume Next
Set rule = isaArray.ArrayPolicy.PolicyRules.Item(ruleName)
If Err.Number = Error_FileNotFound Then
WScript.Echo "The policy rule specified could not be found."
Else
Err.Clear
On Error GoTo 0
If rule.Type = fpcPolicyWebPublishing Then
If rule.WebPublishingProperties.SendAcceptEncodingHeader = False _
Then
rule.WebPublishingProperties.SendAcceptEncodingHeader = True
rule.Save
WScript.Echo "Done!"
Else
WScript.Echo "The policy rule specified already " & _
"allows forwarding of compressed content."
End If
Else
WScript.Echo "The policy rule specified is not a Web publishing rule."
End If
End If
End Sub
Sub Usage()
WScript.Echo "Usage:" & VbCrLf _
& " " & WScript.ScriptName & " RuleName" & VbCrLf _
& "" & VbCrLf _
& " RuleName - Name of the Web publishing rule"
WScript.Quit
End Sub
Requirements
| Client | Requires Windows XP. |
|---|---|
| Server | Requires Windows Server 2003. Requires Windows Server 2003 or Windows 2000 for ISA Server 2004 Standard Edition. |
| Version | Requires Internet Security and Acceleration (ISA) Server 2006 or ISA Server 2004. |
| IDL | Declared in Msfpccom.idl. |
| DLL | Requires Msfpccom.dll. |