Ricky Georgy wrote:
For instance, apache returns the mime type "text/x-python" for python
scripts, which triggers the download dialog.
It would be useful in this case to be able to display them in browser
(instead of browsing for an editor and open them separately).
For what it's worth, biesi has a patch that does this in the relevant bug in
bugzilla...
setResponseHeader("Content-Type", "text/plain", false)
nsHttpChannel::SetResponseHeader says:
3656 // these response headers must not be changed
3657 if (atom == nsHttp::Content_Type ||
3658 atom == nsHttp::Content_Length ||
3659 atom == nsHttp::Content_Encoding ||
3660 atom == nsHttp::Trailer ||
3661 atom == nsHttp::Transfer_Encoding)
3662 return NS_ERROR_ILLEGAL_VALUE;
3663
You could SetContentType instead of SetResponseHeader, for what it's worth...
-Boris
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network