Skip to content
Browse files

Code review changes to satisfy a code dictator :P

  • Loading branch information...
1 parent b25b205 commit ca0015ffec98c4f2d90f76a3675eec53c215acd3 @Haacked committed Jul 18, 2011
View
31 Kudu.Services/GitServer/ForbiddenResult.cs
@@ -1,31 +0,0 @@
-#region License
-
-// Copyright 2010 Jeremy Skinner (http://www.jeremyskinner.co.uk)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// The latest version of this file can be found at http://github.com/JeremySkinner/git-dot-aspx
-
-// This file was modified from the one found in git-dot-aspx
-
-#endregion
-
-namespace Kudu.Services.GitServer {
- using System.Net;
- using System.Web.Mvc;
-
- public class ForbiddenResult : HttpStatusCodeResult {
- public ForbiddenResult() : base((int)HttpStatusCode.Forbidden, "Forbidden") {
- }
- }
-}
View
2 Kudu.Services/Infrastructure/KuduActionInvoker.cs
@@ -20,7 +20,7 @@ public class KuduActionInvoker : ControllerActionInvoker {
return new KuduJsonResult {
Data = actionReturnValue,
JsonRequestBehavior = JsonRequestBehavior.AllowGet,
- MaxJsonLength = int.MaxValue
+ MaxJsonLength = Int32.MaxValue
};
}
}
View
5 Kudu.Services/Infrastructure/KuduController.cs
@@ -1,4 +1,5 @@
-using System.Text;
+using System;
+using System.Text;
using System.Web.Mvc;
namespace Kudu.Services.Infrastructure {
@@ -13,7 +14,7 @@ public class KuduController : Controller {
ContentType = contentType,
ContentEncoding = contentEncoding,
JsonRequestBehavior = behavior,
- MaxJsonLength = int.MaxValue
+ MaxJsonLength = Int32.MaxValue
};
}
}
View
4 Kudu.Services/Infrastructure/KuduJsonResult.cs
@@ -27,7 +27,7 @@ public class KuduJsonResult : JsonResult {
}
if (JsonRequestBehavior == JsonRequestBehavior.DenyGet &&
String.Equals(context.HttpContext.Request.HttpMethod, "GET", StringComparison.OrdinalIgnoreCase)) {
- throw new InvalidOperationException("JSON GET request not allowed"/* MvcResources.JsonRequest_GetNotAllowed */);
+ throw new InvalidOperationException("JSON GET request not allowed");
}
HttpResponseBase response = context.HttpContext.Response;
@@ -43,7 +43,7 @@ public class KuduJsonResult : JsonResult {
}
if (Data != null) {
JavaScriptSerializer serializer = new JavaScriptSerializer {
- MaxJsonLength = this.MaxJsonLength
+ MaxJsonLength = MaxJsonLength
};
response.Write(serializer.Serialize(Data));
}
View
1 Kudu.Services/Kudu.Services.csproj
@@ -62,7 +62,6 @@
<ItemGroup>
<Compile Include="Deployment\DeployController.cs" />
<Compile Include="Editor\FilesController.cs" />
- <Compile Include="GitServer\ForbiddenResult.cs" />
<Compile Include="GitServer\Helpers.cs" />
<Compile Include="GitServer\InfoRefsController.cs" />
<Compile Include="GitServer\Repository.cs" />

0 comments on commit ca0015f

Please sign in to comment.
Something went wrong with that request. Please try again.