Skip to content
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.

Fixed exception messages for server variable parsing #150

Merged
merged 3 commits into from
Oct 24, 2016

Conversation

mikaelm12
Copy link
Contributor

Main thing here is that some of the exception messages for the server variable parsing was incorrect as pointed out in #143. I also did some refactoring to make the server variable parsing for IIS Url rewrite and Apache mod rewrite a little more similar.

Not urgent, just thought I'd open the pr.

@BrennanConroy @Tratcher @natemcmaster @muratg

…iscrepancies between the two server variable parsing methods
case "TIME":
return new DateTimeSegment(variable);
return new DateTimeSegment(serverVariable);
case "API_VERSION":
throw new NotSupportedException();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a message for this one

@@ -55,7 +55,7 @@ public static PatternSegment FindServerVariable(string serverVariable)
case "REQUEST_URI":
return new UrlSegment();
default:
throw new FormatException("Unrecognized server variable");
throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(serverVariable, context.Index));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code has become inconsistent on strings vs resources. We should add an issue to clean this up. (You don't need to add to this PR.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I logged #153

@mikaelm12
Copy link
Contributor Author

@muratg Is this okay to merge to dev, or should we wait?

@muratg
Copy link
Contributor

muratg commented Oct 23, 2016

@mikaelm12 yeah, it should be OK to merge to dev.

@mikaelm12 mikaelm12 merged commit 88aff41 into dev Oct 24, 2016
@mikaelm12 mikaelm12 deleted the mikaelm12/ServerVariableCleanup branch October 24, 2016 18:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants