Skip to content

Commit

Permalink
Add test requests for digits contained in the URI.
Browse files Browse the repository at this point in the history
  • Loading branch information
nrk committed Apr 30, 2011
1 parent 490331c commit fca40b9
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions HttpMachine.Tests/TestRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,51 @@ class TestRequest
Body = null,
ShouldKeepAlive = true
},
new TestRequest() {
Name = "digits in path",
Raw = Encoding.ASCII.GetBytes("GET /foo/500.html HTTP/1.1\r\n\r\n"),
Method = "GET",
RequestUri = "/foo/500.html",
RequestPath = "/foo/500.html",
QueryString = null,
Fragment = null,
VersionMajor = 1,
VersionMinor = 1,
Headers = new Dictionary<string,string>() {
},
Body = null,
ShouldKeepAlive = true
},
new TestRequest() {
Name = "digits in query string",
Raw = Encoding.ASCII.GetBytes("GET /foo?123=abc&def=567 HTTP/1.1\r\n\r\n"),
Method = "GET",
RequestUri = "/foo?123=abc&def=567",
RequestPath = "/foo",
QueryString = "123=abc&def=567",
Fragment = null,
VersionMajor = 1,
VersionMinor = 1,
Headers = new Dictionary<string,string>() {
},
Body = null,
ShouldKeepAlive = true
},
new TestRequest() {
Name = "digits in path and query string",
Raw = Encoding.ASCII.GetBytes("GET /foo/500.html?123=abc&def=567 HTTP/1.1\r\n\r\n"),
Method = "GET",
RequestUri = "/foo/500.html?123=abc&def=567",
RequestPath = "/foo/500.html",
QueryString = "123=abc&def=567",
Fragment = null,
VersionMajor = 1,
VersionMinor = 1,
Headers = new Dictionary<string,string>() {
},
Body = null,
ShouldKeepAlive = true
},
new TestRequest() {
Name = "zero content length",
Raw = Encoding.ASCII.GetBytes("POST /foo HTTP/1.1\r\nFoo: Bar\r\nContent-Length: 0\r\n\r\n"),
Expand Down

0 comments on commit fca40b9

Please sign in to comment.