Parse Error: Expected HTTP/
See original GitHub issueOn mockttp 0.20.0, 0.20.1, and 0.20.2 I get a weird http parse error. I think it is something to do with response encoding.
Node version is 12.18.0
tested the request with request-promise, axios, and fetch with the same results each time
{
"config": {
"url": "https://localhost:1234/oauth/access_token.php",
"method": "post",
"data": {
"_overheadLength": 432,
"_valueLength": 150,
"_valuesToMeasure": [],
"writable": false,
"readable": true,
"dataSize": 0,
"maxDataSize": 2097152,
"pauseStreams": true,
"_released": true,
"_streams": [],
"_currentStream": null,
"_insideLoop": false,
"_pendingNext": false,
"_boundary": "--------------------------229731192039541199026626",
"_events": {},
"_eventsCount": 1
},
"headers": {
"Accept": "application/json, text/plain, */*",
"Content-Type": "multipart/form-data; boundary=--------------------------229731192039541199026626",
"User-Agent": "axios/0.19.2"
},
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 0,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1
},
"code": "HPE_INVALID_CONSTANT"
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Parse error when no HTTP/ ... in the response message #9176
Below error message from console. "POST http://192.168.225.1/ Error: Parse Error: Expected HTTP/ Request Headers Content-Type: application/json
Read more >python - Parse Error: The server returned a malformed response
What does Error: Parse Error: Expected HTTP/ mean? I checked my app logs but it seems it is not handling any request, even...
Read more >Getting Error: "Parse Error: Expected HTTP" - General
Hi, I have a ethernet webrelay (WebRelay | Ethernet Relay | Remote Relay Control) that opens my front door. To open the door...
Read more >"Error: Parse Error: Expected HTTP/" when using dns
I have a simple http rest api, which works perfectly when using the ip address directly. I made a dns A record (unproxied)...
Read more >HTTP Request or Response Parse Error | Imperva
HTTP Request or Response Parse Error Summary The SecureSphere HTTP Module could not parse the HTTP Request or response due to malformed format....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great! Thanks for testing that. I’ll put together a proper release in the next day or so, so you can use this for real, watch this space.
This was just published as v0.20.3 🎉.
Thanks for reporting this. Hope that sorts things out for you, let me know if you have any other trouble.