Bug 1451042
Summary: | sdk curl debug fails with UnicodeDecodeError: 'utf8' codec can't decode | ||
---|---|---|---|
Product: | [oVirt] ovirt-engine-sdk-python | Reporter: | Fabrice Bacchella <fabrice.bacchella> |
Component: | Core | Assignee: | Juan Hernández <juan.hernandez> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Matyáš <pmatyas> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.1.3 | CC: | bugs, juan.hernandez, lsvaty, omachace, stirabos |
Target Milestone: | ovirt-4.1.3 | Flags: | rule-engine:
ovirt-4.1+
lsvaty: testing_ack+ |
Target Release: | 4.1.4 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | python-ovirt-engine-sdk4-4.1.4 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-07-06 13:25:22 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Fabrice Bacchella
2017-05-15 15:52:54 UTC
For my application, I have done that: https://github.com/fbacchella/ovirtcmd/blob/sdk4/ovlib/context.py#L15 https://github.com/fbacchella/ovirtcmd/blob/sdk4/ovlib/context.py#L116 It generate output like: TCP_NODELAY set Connected to ovirt.prod.exalead.com (10.83.16.34) port 443 (#0) ALPN, offering http/1.1 ... > POST /ovirt-engine/sso/oauth/token-http-auth HTTP/1.1 ... >> scope=ovirt-app-api&grant_type=urn%3Aovirt%3Aparams%3Aoauth%3Agrant-type%3Ahttp < HTTP/1.1 401 Unauthorized ... << <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> << <html><head> if self.filter is set to CurlDebugType.TEXT | CurlDebugType.HEADER | CurlDebugType.DATA We need to fix this, and we can add the < and > to indicate the direction of messages. But I think we should not add a debug function, at least not that uses the same contract that pycurl uses, as that is an internal implementation detail, and it may be impossible to implement if one day we replace libcurl or pycurl with a different library. Verified on python sdk 4.1.4 |