Commit 8cc01e4a authored by Brickner_cp's avatar Brickner_cp

Support for writing packets with an invalid non-ASCII HTTP request URI.

parent bc5426c5
......@@ -129,7 +129,7 @@ namespace PcapDotNet.Packets.TestUtils
int uriLength = random.Next(100);
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i != uriLength; ++i)
stringBuilder.Append(random.NextChar((char)33, (char)127));
stringBuilder.Append(random.NextChar((char)33, (char)255));
return stringBuilder.ToString();
}
......
using System;
using System.Text;
using PcapDotNet.Base;
namespace PcapDotNet.Packets.Http
{
......@@ -70,7 +71,7 @@ namespace PcapDotNet.Packets.Http
if (Uri == null)
return;
buffer.Write(ref offset, Uri, Encoding.ASCII);
buffer.Write(ref offset, Uri, EncodingExtensions.Iso88591);
buffer.Write(ref offset, AsciiBytes.Space);
if (Version == null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment