httpmorph icon indicating copy to clipboard operation
httpmorph copied to clipboard

Response text returns junk

Open rumca-js opened this issue 1 year ago • 1 comments

Environment

Linux mint

problem

  • text is not accessible
  • junk is written to stdout, or stderr when calling it.

My output

Statuscode: 200
Headers:{'Date': 'Sun, 09 Nov 2025 14:17:58 GMT', 'Expires': '-1', 'Cache-Control': 'private, max-age=0', 'Content-Type': 'text/html; charset=UTF-8', 'Strict-Transport-Security': 'max-age=31536000', 'Content-Security-Policy-Report-Only': "object-src 'none';base-uri 'self';script-src 'nonce-AP-TVFPWkB-eE_aEH0AI8Q' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp", 'Cross-Origin-Opener-Policy': 'same-origin-allow-popups; report-to="gws"', 'Report-To': '{"group":"gws","max_age":2592000,"endpoints":[{"url":"https://csp.withgoogle.com/csp/report-to/gws/other"}]}', 'Accept-CH': 'Sec-CH-UA-WoW64', 'Permissions-Policy': 'unload=()', 'P3P': 'CP="This is not a P3P policy! See g.co/p3phelp for more info."', 'Content-Encoding': 'gzip', 'Server': 'gws', 'X-XSS-Protection': '0', 'X-Frame-Options': 'SAMEORIGIN', 'Set-Cookie': '__Secure-ENID=29.SE=ZNoFWhdnDdiIJTOoMvBkAj1udRj30KwN3eiy78kUbPomFQ_nBHdTAFfEfngtP63xS1vyi4-t_tSPHkq3S6wzw7DZer4i4NAUlgchX0bW9sXnafF_KUQv7mW96odyZVeGajoCQlodMHXKopiK5-v-1fb8DHstA7E35co5OGZTrEtey0md5PYaq2rHroulcCV41hMr_wCJkdpjd4CwY-_FOelfw9CG5YLfffR6PdJPP89ofRt9PTXw0uRPBoeB89xl3Q; expires=Thu, 10-Dec-2026 06:36:16 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax', 'Alt-Svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000', 'Transfer-Encoding': 'chunked'}


Text:
imer:** The authors disclaim all liability for any damages arising from use or misuse of this software. This software is provided "AS IS" without warranties of any kind. Use at your own risk.

**Agreement:** By using this software, you agree to these terms. If you disagree, do not use this software.

---

*Use this tool ethically and legally. You assume all risks and responsibilities.*
sponsQ{ | Supported |
| Exception hierarchy | Supported |

## Response Object

```python
response = httpmorph.get('https://httpbin.org/get')

# Status and headers
print(response.status_code)      # 200
print(response.ok)                # True
print(response.reason)            # 'OK'

rumca-js avatar Nov 09 '25 14:11 rumca-js

@rumca-js, thank you for reporting this. I found the issue: it fails to decode gzip-compressed responses. I'm working on a fix and will add more test cases to prevent similar problems in the future.

arman-bd avatar Nov 09 '25 16:11 arman-bd