Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pcap-Net
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Pcap-Net
Commits
8cc01e4a
Commit
8cc01e4a
authored
Apr 01, 2012
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for writing packets with an invalid non-ASCII HTTP request URI.
parent
bc5426c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
RandomHttpExtensions.cs
.../src/PcapDotNet.Packets.TestUtils/RandomHttpExtensions.cs
+1
-1
HttpRequestLayer.cs
PcapDotNet/src/PcapDotNet.Packets/Http/HttpRequestLayer.cs
+2
-1
No files found.
PcapDotNet/src/PcapDotNet.Packets.TestUtils/RandomHttpExtensions.cs
View file @
8cc01e4a
...
@@ -129,7 +129,7 @@ namespace PcapDotNet.Packets.TestUtils
...
@@ -129,7 +129,7 @@ namespace PcapDotNet.Packets.TestUtils
int
uriLength
=
random
.
Next
(
100
);
int
uriLength
=
random
.
Next
(
100
);
StringBuilder
stringBuilder
=
new
StringBuilder
();
StringBuilder
stringBuilder
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
!=
uriLength
;
++
i
)
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
();
return
stringBuilder
.
ToString
();
}
}
...
...
PcapDotNet/src/PcapDotNet.Packets/Http/HttpRequestLayer.cs
View file @
8cc01e4a
using
System
;
using
System
;
using
System.Text
;
using
System.Text
;
using
PcapDotNet.Base
;
namespace
PcapDotNet.Packets.Http
namespace
PcapDotNet.Packets.Http
{
{
...
@@ -70,7 +71,7 @@ namespace PcapDotNet.Packets.Http
...
@@ -70,7 +71,7 @@ namespace PcapDotNet.Packets.Http
if
(
Uri
==
null
)
if
(
Uri
==
null
)
return
;
return
;
buffer
.
Write
(
ref
offset
,
Uri
,
Encoding
.
ASCII
);
buffer
.
Write
(
ref
offset
,
Uri
,
Encoding
Extensions
.
Iso88591
);
buffer
.
Write
(
ref
offset
,
AsciiBytes
.
Space
);
buffer
.
Write
(
ref
offset
,
AsciiBytes
.
Space
);
if
(
Version
==
null
)
if
(
Version
==
null
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment