Change in ovirt-engine-sdk-ruby[master]: Check content type only when really needed

From Juan Hernandez <juan.hernandez@redhat.com>:
Juan Hernandez has submitted this change and it was merged. Change subject: Check content type only when really needed ...................................................................... Check content type only when really needed Currently the SDK checks the content type of all responses, even of responses where the content type doesn't need to be provided. For example, when a 404 error code is generated by the application server, or by the web server, the content type may not be present, or may be HTML. In these situations the SDK is not reacting correctly, as the message that explains that the content type isn't correct is hiding other more important messages, like the HTTP result code. To avoid that this patch changes the SDK so that it will check the content type only when it really tries to parse the response body. In addition, the patch also changes the generated messages, so that the HTTP details, including the HTTP error code, will appear in the message in all cases. Change-Id: I0a41409f985c82452447dcc9f99445338a253b4f Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M sdk/lib/ovirtsdk4/connection.rb M sdk/lib/ovirtsdk4/service.rb M sdk/spec/service_spec.rb M sdk/spec/vm_service_spec.rb 4 files changed, 152 insertions(+), 75 deletions(-) Approvals: Ondra Machacek: Looks good to me, but someone else must approve Juan Hernandez: Verified; Looks good to me, approved Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/75663 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a41409f985c82452447dcc9f99445338a253b4f Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk-ruby Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Ondra Machacek <omachace@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
Code Review