diff --git a/src/Microsoft.AspNet.Owin/Microsoft.AspNet.Owin.kproj b/src/Microsoft.AspNet.Owin/Microsoft.AspNet.Owin.kproj
index 825f49a06f..ea1daa11aa 100644
--- a/src/Microsoft.AspNet.Owin/Microsoft.AspNet.Owin.kproj
+++ b/src/Microsoft.AspNet.Owin/Microsoft.AspNet.Owin.kproj
@@ -25,6 +25,7 @@
+
-
+
\ No newline at end of file
diff --git a/src/Microsoft.AspNet.Owin/OwinEnvironment.cs b/src/Microsoft.AspNet.Owin/OwinEnvironment.cs
index 8f6f9c4951..040def476e 100644
--- a/src/Microsoft.AspNet.Owin/OwinEnvironment.cs
+++ b/src/Microsoft.AspNet.Owin/OwinEnvironment.cs
@@ -37,8 +37,8 @@ namespace Microsoft.AspNet.Owin
{ OwinConstants.RequestMethod, new FeatureMap(feature => feature.Method, (feature, value) => feature.Method = Convert.ToString(value)) },
{ OwinConstants.RequestPathBase, new FeatureMap(feature => feature.PathBase, (feature, value) => feature.PathBase = Convert.ToString(value)) },
{ OwinConstants.RequestPath, new FeatureMap(feature => feature.Path, (feature, value) => feature.Path = Convert.ToString(value)) },
- { OwinConstants.RequestQueryString, new FeatureMap(feature => RemoveQuestionMark(feature.QueryString),
- (feature, value) => feature.QueryString = AddQuestionMark(Convert.ToString(value))) },
+ { OwinConstants.RequestQueryString, new FeatureMap(feature => Utilities.RemoveQuestionMark(feature.QueryString),
+ (feature, value) => feature.QueryString = Utilities.AddQuestionMark(Convert.ToString(value))) },
{ OwinConstants.RequestHeaders, new FeatureMap(feature => feature.Headers, (feature, value) => feature.Headers = (IDictionary)value) },
{ OwinConstants.RequestBody, new FeatureMap(feature => feature.Body, (feature, value) => feature.Body = (Stream)value) },
@@ -62,7 +62,7 @@ namespace Microsoft.AspNet.Owin
{ OwinConstants.SendFiles.SendAsync, new FeatureMap(feature => new SendFileFunc(feature.SendFileAsync)) },
- { OwinConstants.Security.User, new FeatureMap(feature => feature.User, (feature, value) => feature.User = MakeClaimsPrincipal((IPrincipal)value)) },
+ { OwinConstants.Security.User, new FeatureMap(feature => feature.User, (feature, value) => feature.User = Utilities.MakeClaimsPrincipal((IPrincipal)value)) },
};
if (context.Request.IsSecure)
@@ -230,36 +230,6 @@ namespace Microsoft.AspNet.Owin
throw new NotImplementedException();
}
- private string RemoveQuestionMark(string queryString)
- {
- if (!string.IsNullOrEmpty(queryString))
- {
- if (queryString[0] == '?')
- {
- return queryString.Substring(1);
- }
- }
- return queryString;
- }
-
- private string AddQuestionMark(string queryString)
- {
- if (!string.IsNullOrEmpty(queryString))
- {
- return '?' + queryString;
- }
- return queryString;
- }
-
- private ClaimsPrincipal MakeClaimsPrincipal(IPrincipal principal)
- {
- if (principal is ClaimsPrincipal)
- {
- return principal as ClaimsPrincipal;
- }
- return new ClaimsPrincipal(principal);
- }
-
public class FeatureMap
{
public FeatureMap(Type featureInterface, Func