-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
session.request.complete Transfer-Encoding: chunked gzip concatenated rawResponse gunzip issue #37
Comments
Pleaase try with v1.12.8 :) It should be fixed! Let me know! |
Getting the same error. Here's the full error trace:
There are now 4 chunks. Here are their relevant buffer data converted to string hex: Buffer2: Buffer3: Buffer4: |
You might find this relevant. The header bytes starting in buffer1 should start with |
Ok, I made a mistake with encoding. It is solved with this commit. Download the version @1.12.9 and let me know :) |
The response decodes! Party! Something strange though (and perhaps I'm just doing a stupid), the last response passes through
I have breakpoints on |
You have to use promise to do this! :) |
Facepalm. Thanks. I've used
This is what the response body looks like passed to the client:
|
Ok, it coudn't be so easy! This is fixed with the version @1.12.15. |
I've given the new version a go. Got a new error:
This is what the response body looks like passed to the client:
|
Can you show me your code in injectResponse-Callback? My test works with the new object as well |
Sure. Can you share a handle to an out-of-band DM platform? |
No sorry. |
Ok. The error occurs on the second line when receiving a "large" response from the server:
|
I tested your big string with the test that you can find here https://github.com/gr3p1p3/transparent-proxy/blob/master/test.js#L389 and it works perfectly. Did you decode it after Edit: Have a look here https://stackoverflow.com/a/70314112 |
News? @confuciussayuhm |
Howzit @gr3p1p3. I need to build a PoC that serves the same chunked server response to you that I am getting so you can debug. You've put some fire under me to get this done. My |
Howzit @gr3p1p3. I'm back at this again. I see the error I am getting is back to the
Further to this, the app prints more errors:
There are 8 chunks in this server response:
You can duplicate this error with the following:
|
I revisited the http-parsing using http-native-server and client. Try with new version 1.15.0 and let me know! |
I get a crash on
I haven't modified my code (apart from updating to the latest version of |
I think I found the problem to this working on another project: caido/caido#844 |
Hi there,
As per your request to create another issue, here is the rawResponse buffer (in hex string format) of a concatenated rawResponse that does not decode from gzip and produces the error
Uncaught Error Error: Error: incorrect header check
.Buffer.from("610d0a1f8b08000000000000000d0a3165630d0a0cc6c76ea3400000d07fe14a24623a91f6e0a11adc30c5c02a078ae9a60e6526cabfefbed3fb21fa619a610c9799f8a23f88e9352f2dfcffbf3f4416c398f822229915fa514ec35e60eb1dd280a27992c9297d64edb961af9a25ef33a5500a96afb71ab70f39948c7dcb022355db83a3a4818730aaef4ade0254b25b25afe2997613cb23bbd1f2b51bc73bd9e073c80132027496798178a706336697ad4e70fbbc3f86a3d83b972be84fda2a5e557257f8bbd076c540156a5d292c0eda243c443ca28b97ee71e0656b1575d314643e4cc14b5470b2cf01b01d8bdd50cd2b8169ac1208ce5870627fbd27064a83629840a696b9108aecc404879c934452adf7f53d6c93eb517a14ed9748e2e5a645c08a0b6965d357d789b07049806d51437c2996cce89a81ed964b59baf3fbe1285847cfa9c99b2186cd0a85371c502c92b01e0dbb3d270ba7c743e615e253bd4eb3b27d8e5030debed973a4b81fabeed2d3c71c87ee952f2ef4d395124d0b411395b1c12c27c1e70cd5bc60e69c544a8bb729dc1310463315de8ba0566ba604aab6e5d6b192492d6036791e7b88d7c8928c03dc5b1e90c2b08d7ce521ddacbb1a7c9a19390d7cbebcfc5c67cd67daf13e50bdb460aa26854c1b0d9674c3867b7ac5ebede8b2d0cf8d371d73a45b1df8260ae6c3e90ff1fbfdfb0f0000ffff0d0a610d0a0300f1ac6673530200000d0a300d0a0d0a", "hex")
The response is JSON and should look like this once decoded correctly:
{"oprstatus":2,"results":[{"data":"ZC47oqCcYo74jxt2B/26+3f/Gq4Qsk4NFKCxs/D/DzCNOjzlRCY9HxwdXHcEl1SDcXUyzyjPDflByh4wiCv8L2TbKU+nqKVFO56SdpV5ySBCyB2ddUX8P/pJa4uwjbzlWPRpA8oSMNBoIFv8NE+xD6P7lngp/gEjiD4zXlbY1Z6y2geGU5BeQFi/OFDyJRJ7UbEBIQLXBQSK4wyj6DXJHv9BXLz7SaVvPbHycXgprBdEhf7Y84r3X1f598+EjxvmpwrTU/GZZxMZ96CklyBKag9v4cenn8tgT+BzQ8Fy6h8h3qTJXQThuhhTsmRSDzGyWrkfkpatkvt7mtpya8+tjqHQlLbu5GapdUg8WENrsDw0qt7HmVJo5+8xAinMo2AfzYTN6gM2WT9bFFYBkZhaH3uI7V5HEJMz3LbiDlzwrYxbBYZs/YPgXjEj3hBEFwfKAiC+FX3wCsqotzvZK9H1txl6B+7pwq6iUyGJjnjB0Jd+rp6fueVfG4JWcn6VBEUcg3ikct3lZpK9OzHTIeavOAT4tVfHm2a5+Ti16kZXs1I="}]}
The text was updated successfully, but these errors were encountered: