Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Products
/
VSTT-Plugins
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
2
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
e6e2f325
...
e6e2f325ff72b6364e8f93aa9c92a209ee1786f0
authored
2019-02-25 17:57:49 +0100
by
Christian Gerdes
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Modified Extract Cookie to use the built in cookie parser instead.
1 parent
bd414362
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
LIL_VSTT_Plugins/ExtractionRules.cs
LIL_VSTT_Plugins/ExtractionRules.cs
View file @
e6e2f32
...
...
@@ -130,26 +130,17 @@ namespace LIL_VSTT_Plugins
public
override
void
Extract
(
object
sender
,
ExtractionEventArgs
e
)
{
WebHeaderCollection
col
=
e
.
Response
.
Headers
;
foreach
(
string
h
in
col
.
Keys
)
foreach
(
Cookie
ck
in
e
.
Response
.
Cookies
)
{
if
(
h
.
Equals
(
"Set-Cookie"
))
if
(
ck
.
Name
.
Equals
(
cookieName
))
{
string
[]
cookie
=
col
[
h
].
Split
(
'='
);
if
(
cookie
[
0
].
Equals
(
cookieName
))
{
string
value
=
""
;
if
(
cookie
.
Length
>
1
)
{
value
=
cookie
[
1
].
Split
(
';'
)[
0
];
}
e
.
WebTest
.
Context
.
Add
(
this
.
ContextParameterName
,
WebUtility
.
UrlDecode
(
value
));
e
.
WebTest
.
Context
.
Add
(
this
.
ContextParameterName
,
WebUtility
.
UrlDecode
(
ck
.
Value
));
e
.
Success
=
true
;
e
.
Message
=
"Cookie found"
;
return
;
}
}
}
e
.
Success
=
false
;
e
.
Message
=
"Cookie not found"
;
}
...
...
Please
register
or
sign in
to post a comment