And so I posted to the Aspose forums to help a brother out!
http://www.aspose.com/community/forums/245095/response.flush-clears-content-type-header-in-documentation-example-for-aspose.slides-for-.net-.sa/showthread.aspx#245095
"In IIS7 integrated pipeline mode, a call to Response.Flush causes the response to be sent without the content-type header unless a content-length has also been specified. In IIS6 or classic pipeline mode, the content-type header is sent as expected."
Posted by richard_deeming on 8/4/2009 at 7:44 AM
The issue appears to be in the internal HttpResponse.UpdateNativeResponse method:
if (((this._contentType != null) && this._contentTypeSet) && ((bufferedLength > 0L) || this._contentLengthSet))
{
HttpHeaderCollection headers = this.Headers as HttpHeaderCollection;
string str = this.AppendCharSetToContentType(this._contentType);
headers.Set("Content-Type", str);
this._contentTypeSet = false;
}
If the content length has not been set and no content has been generated, the content type header will not be sent.
In contrast, for IIS6 or classic pipeline mode, the WriteHeaders method calls GenerateResponseHeaders, which has:
if ((this._statusCode != 0xcc) && (this._contentType != null))
{
string str2 = this.AppendCharSetToContentType(this._contentType);
headers.Add(new HttpResponseHeader(12, str2));
}
Posted by Microsoft on 8/5/2009 at 2:55 AM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com/)
Posted by Microsoft on 8/6/2009 at 8:13 PM
Thanks for your feedback.
We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Thank you
Posted by Microsoft on 9/23/2009 at 10:16 AM
This issue will be fixed in the next major release of the ASP.NET and the .NET Framework.
Thank you for submitting this issue on Connect.
http://connect.microsoft.com/VisualStudio/feedback/details/480689/response-flush-clears-content-type-header
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment