Permalink
Browse files

Fix RandomHttpTest by only checking IsValidStart for HTTP requests wh…

…en their URI is not empty.
  • Loading branch information...
bricknerb committed May 26, 2018
1 parent 57a21ac commit e1cfa913429de61676820d39da92c8af0603b6ea
Showing with 2 additions and 1 deletion.
  1. +2 −1 PcapDotNet/src/PcapDotNet.Packets.Test/HttpTests.cs
@@ -108,7 +108,8 @@ public void RandomHttpTest()
if (httpLayer.Header != null)
{
Assert.AreEqual(httpLayer.Header.GetHashCode(), httpDatagram.Header.GetHashCode());
Assert.IsTrue(httpDatagram.IsValidStart, "IsValidStart");
if (!httpDatagram.IsRequest || ((HttpRequestDatagram)httpDatagram).Uri != "")
Assert.IsTrue(httpDatagram.IsValidStart, "IsValidStart");
foreach (var field in httpLayer.Header)
Assert.IsFalse(field.Equals("abc"));

0 comments on commit e1cfa91

Please sign in to comment.