Skip to content

exception_catcher: return XML response body when invalid %encoding is detected#14

Merged
bors[bot] merged 1 commit intomasterfrom
bugfix/invalid-pct-encoding-response-format
Apr 10, 2018
Merged

exception_catcher: return XML response body when invalid %encoding is detected#14
bors[bot] merged 1 commit intomasterfrom
bugfix/invalid-pct-encoding-response-format

Conversation

@miguelsorianod
Copy link
Copy Markdown
Contributor

When performing a request with an invalid percentage-encoding
format we now return an XML from a Backend::Error type of error.
Previously when an invalid percentage-encoding was detected
the response was a sinatra error.

This has been done in the same way that was done with the response error management of INVALID_BYTE_SEQUENCE_ERR_MSG

Comment thread test/integration/listener_test.rb Outdated
end

def test_invalid_percent_encoding
#We pass a string and not a hash as a parameter due to
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: leave a space between the comment symbol and the start of the comment for readability

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

When performing a request with an invalid percentage-encoding
format we now return an XML from a Backend::Error type of error.
Previously when an invalid percentage-encoding was detected
the response was a sinatra error.
@miguelsorianod miguelsorianod force-pushed the bugfix/invalid-pct-encoding-response-format branch from 423f025 to cb485c7 Compare April 10, 2018 10:38
@davidor
Copy link
Copy Markdown
Contributor

davidor commented Apr 10, 2018

bors r=@unleashed,@davidor

bors Bot added a commit that referenced this pull request Apr 10, 2018
14: exception_catcher: return XML response body when invalid %encoding is detected r=unleashed,davidor a=miguelsorianod

When performing a request with an invalid percentage-encoding
format we now return an XML from a Backend::Error type of error.
Previously when an invalid percentage-encoding was detected
the response was a sinatra error.

This has been done in the same way that was done with the response error management of INVALID_BYTE_SEQUENCE_ERR_MSG

Co-authored-by: Miguel Soriano <msoriano@redhat.com>
Copy link
Copy Markdown
Member

@eguzki eguzki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not include logic and tests code updates in the same commit. Cleaner in separate commits.

@bors
Copy link
Copy Markdown
Contributor

bors Bot commented Apr 10, 2018

Build succeeded

@bors bors Bot merged commit cb485c7 into master Apr 10, 2018
@bors bors Bot deleted the bugfix/invalid-pct-encoding-response-format branch April 10, 2018 10:43
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.

4 participants