Sandro Bonazzola has submitted this change and it was merged.
Change subject: sercon: send correct content-type from client
......................................................................
sercon: send correct content-type from client
Declare the correct content-type for requests from client.
Roughly after the move to Wildfly, the ovirt-vmconsole-list.py helper
stopped working, because the server-side applet was not able anymore
to fetch the request body.
That happened because the ovirt-vmconsole-list.py helper was using
an incorrect content-type for its requests: it stated that the body
is encoded using MIME type 'application/x-www-form-urlencoded',
but that was false.
When we use the x-www-form-urlencoded content type the server tries
to interpret it as form, and thus it consumes all the body input stream
looking for "a=b&c=d&...".
This may have changed from jboss to wildfly, but the key point was that
the incorrect (and default) content-type sent by client may confuse a
well-behaving conformant server, leading into troubles.
This patch fixes the client using the correct content-type: 'text/plain'.
Change-Id: Iecd37a03d18aa720f00011c91d23a27738afacd2
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M packaging/libexec/ovirt-vmconsole-proxy-helper/ovirt-vmconsole-list.py
1 file changed, 8 insertions(+), 4 deletions(-)
Approvals:
Alon Bar-Lev: Looks good to me, but someone else must approve
Sandro Bonazzola: Looks good to me, approved
Jenkins CI: Passed CI tests
Francesco Romani: Verified
--
To view, visit
https://gerrit.ovirt.org/44170
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iecd37a03d18aa720f00011c91d23a27738afacd2
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbonazzo(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org