Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast xml parser encoding #1414

Merged
merged 11 commits into from
May 17, 2019
Merged

Fast xml parser encoding #1414

merged 11 commits into from
May 17, 2019

Conversation

bjoernricks
Copy link
Contributor

@bjoernricks bjoernricks commented May 17, 2019

Fix decoding of xml entities with fast-xml-parser

Checklist:

Instead add a status getter to the Rejection class.
Setting the responseType doesn't work after the xhr request has already
finished. Therefore extend plainText method to allow to return the
original response as text.
Add the same plainData method to Rejection class as in Response.
Extract common xml transformation code into an own module.
Simplify x2js and fastxml trasnfrom modules by using the new xml module.
Finally fix all xml encoding issues when using the fastxml transform.
This will allow to use the fastxml transform as default in future.
This has become obsolete with the fastxml transform doing the decoding
automatically.
It's not necessary to keep the copied values in the envelope.
@bjoernricks bjoernricks marked this pull request as ready for review May 17, 2019 12:57
@bjoernricks bjoernricks requested a review from swaterkamp as a code owner May 17, 2019 12:57
@bjoernricks bjoernricks requested a review from a team May 17, 2019 12:57
@codecov
Copy link

codecov bot commented May 17, 2019

Codecov Report

Merging #1414 into gsa-8.0 will increase coverage by 0.14%.
The diff coverage is 89.36%.

Impacted file tree graph

@@             Coverage Diff             @@
##           gsa-8.0    #1414      +/-   ##
===========================================
+ Coverage    36.68%   36.82%   +0.14%     
===========================================
  Files          960      961       +1     
  Lines        21741    21737       -4     
  Branches      6017     6042      +25     
===========================================
+ Hits          7975     8004      +29     
+ Misses       12435    12410      -25     
+ Partials      1331     1323       -8
Impacted Files Coverage Δ
gsa/src/gmp/models/testing.js 100% <ø> (ø) ⬆️
gsa/src/gmp/models/filter/convert.js 100% <ø> (ø) ⬆️
gsa/src/gmp/models/report/parser.js 4.79% <ø> (ø) ⬆️
gsa/src/gmp/models/result.js 96.22% <0%> (ø) ⬆️
gsa/src/gmp/http/transform/fastxml.js 100% <100%> (+80%) ⬆️
gsa/src/gmp/models/nvt.js 100% <100%> (ø) ⬆️
gsa/src/gmp/http/response.js 80% <100%> (+27.36%) ⬆️
gsa/src/gmp/parser.js 99.14% <100%> (-0.01%) ⬇️
gsa/src/gmp/http/rejection.js 100% <100%> (ø) ⬆️
gsa/src/gmp/commands/login.js 34.78% <50%> (ø) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c1941a...af93b5e. Read the comment docs.

@swaterkamp swaterkamp merged commit 188ed32 into greenbone:gsa-8.0 May 17, 2019
@bjoernricks bjoernricks deleted the fast-xml-parser-encoding branch August 9, 2019 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants