This commit is contained in:
Leonardo Taglialegne 2013-08-22 01:11:38 +02:00
Родитель 0008ca1779
Коммит 395785dec6
8 изменённых файлов: 8 добавлений и 12 удалений

Просмотреть файл

@ -178,7 +178,7 @@ namespace Mono.WebServer.Apache {
}
try {
if (server.Start (!configurationManager.NonStop, (int)configurationManager.Backlog) == false)
if (!server.Start (!configurationManager.NonStop, (int)configurationManager.Backlog))
return 2;
if (!configurationManager.NonStop) {

Просмотреть файл

@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections.Generic;
namespace Mono.WebServer.FastCgi

Просмотреть файл

@ -35,7 +35,7 @@ namespace Mono.WebServer.Fpm {
readonly BoolSetting stoppable = new BoolSetting ("stoppable", Descriptions.Stoppable);
readonly StringSetting configDir = new StringSetting ("config-dir", "Directory containing the configuration files.");
readonly StringSetting fastCgiCommand = new StringSetting ("fastcgi-command", "Name (if in PATH) or full path of the fastcgi executable", defaultValue: "fastcgi-mono-server");
readonly StringSetting fastCgiCommand = new StringSetting ("fastcgi-command", "Name (if in PATH) or full path of the fastcgi executable", defaultValue: "fastcgi-mono-server4");
#endregion
#region Typesafe properties

Просмотреть файл

@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using Mono.WebServer.FastCgi.Compatibility;
using NUnit.Framework;

Просмотреть файл

@ -230,7 +230,7 @@ namespace Mono.WebServer.XSP
stream.Close ();
if (stream != netStream) {
netStream.Close ();
} else if (false == netStream.OwnsSocket) {
} else if (!netStream.OwnsSocket) {
try {
if (sock.Connected && !(sock.Poll (0, SelectMode.SelectRead) && sock.Available == 0))
sock.Shutdown (SocketShutdown.Both);

Просмотреть файл

@ -441,7 +441,7 @@ namespace Mono.WebServer
return null;
var content_length = (string) headers ["Content-Length"];
long length = -1;
long length;
// If not empty parse, if correctly parsed validate
if (!String.IsNullOrEmpty (content_length)
@ -450,7 +450,7 @@ namespace Mono.WebServer
throw new InvalidOperationException ("Content-Length exceeds the maximum accepted size.");
int input_data_length = inputLength - position;
if (length == -1 || length > input_data_length)
if (length < 0 || length > input_data_length)
length = input_data_length;
var result = new byte [length];

Просмотреть файл

@ -462,10 +462,10 @@ namespace Mono.WebServer
// The next line can throw (reusing and the client closed)
Worker worker = webSource.CreateWorker (accepted, this);
worker.SetReuseCount (reuses);
if (false == worker.IsAsync)
ThreadPool.QueueUserWorkItem (worker.Run);
else
if (worker.IsAsync)
worker.Run (null);
else
ThreadPool.QueueUserWorkItem (worker.Run);
} catch (Exception) {
try {
if (accepted != null) {

Просмотреть файл

@ -30,7 +30,6 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.Threading;
using System.Diagnostics;
namespace Mono.WebServer.Log {
public static class Logger