2013-07-20 16 views
2

我在Mono 2.10運行的.NET,與ServiceStack 55年3月9日單渲染意見(錯誤?)號,在IIS是確定

開發,當我運行在IIS快遞一切正常的網站,但與單聲道2.10和fastcgi-server4頁面呈現額外的數字,如0和f7e。

我已經測試了這個o Ubuntu 12,Debian 6和7,並且顯示了相同的數字。

看到這裏。 http://aaviseu.guilhermecardoso.pt/home

你認爲它可能是什麼?

更新:此錯誤只出現在2.10,它與chuncked編碼(在2x上)有關。我不知道什麼時候這是固定的,但我使用3.2.7沒有任何問題

+0

此外nginx的,你能與Apache測試? – linquize

+0

我不能讓剃刀呈現與mod單聲道(我已經複製了相同的程序集,我在nginx上測試) –

回答

1

看起來像你有類似的問題,我: Binary data corrupted when hosting ServiceStack in Mono + FastCGI - f7e可能是數據大小(3966字節) 。

編輯:

這是由於分塊傳輸(在HTTP 1.1中引入)。我能夠通過強制請求使用HTTP 1.0來解決我的問題。

在我的問題knocte建議補丁單可能會解決您的問題:

補丁:https://bugzilla.xamarin.com/attachment.cgi?id=3356

文件:https://github.com/mono/mono/blob/master/mcs/class/System.Web/System.Web/HttpResponse.cs

+0

不幸的是我不夠熟練(但!)。 這就是我所做的:叉單聲道投影,在我的回購(從github我編輯該文件)在分支2.10上做了補丁,我已經從我的git repo安裝單聲道選擇分支2.10。我仍然得到響應的數字,但我不知道如果我已經安裝了修改後的叉。 你知道我應該如何正確地做到這一點? –

+0

這就是我會做的。要調試它,只需添加一條日誌消息 'if(worker_request.GetHttpVersion()==「HTTP/1.1」){ \t string GatewayIface = context.Request.ServerVariables [「GATEWAY_INTERFACE」]; \t use_chunked =(GatewayIface == null ||!GatewayIface.StartsWith(「CGI」)); \t \t 使用(StreamWriter的W = File.AppendText( 「/ TMP/my_mono_fork.log」)) \t \t w.WriteLine( 「use_chunked = {0} GatewayIface = {1}」,use_chunked,GatewayIface); } else \t use_chunked = false;'' – woli