-
Notifications
You must be signed in to change notification settings - Fork 883
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
Restore ability to relay POST requests with empty bodies #1340
Conversation
You'll have to excuse my lack of experience with go here. Installed
Looks like I need to checkout out vendor dependencies first? |
Try running: go mod vendor |
Unfortunately still same prob. Here's
|
And that using the latest golang. If golang was installed with apt-get it’s probably out of date. |
Ah yes - makes sense. apt version is 1.19, so somewhat old. Appears to be building no probs now. Thanks! Will report back shortly |
Hi @maggie44, Finally got it built and testing. However, as far as I can see this doesn't fix the issue, I'm afraid. ![]() |
There isn't much that changed in the last release by the looks of it: 2024.9.1...2024.10.0 Are you using quick tunnels or connecting with a config file? |
Worth double checking you are on the right branch too. If you cloned the fork of this called |
Yes, it's from the
|
Yes, it is a
|
From your first build attempt it logged And the output of version should show something like
|
Since I'm in this context, I'm going to try bisecting to find the origin commit. This will take a little while |
Sounds like a good idea. You could undo each commit one at a time and test it. There aren't many commits between the last working version. You can skip all the tests and just do the build with |
Alright, completed the bisect and can confirm that the breaking commit is e2064c8 |
Probably narrows it to this then: e2064c8#diff-6ff9dc179d3cf0539f514218792ce1d93001e2b4835a695bde442ad45edf01deR562-R579
And this part using metadata:
|
Just double checked that simply reverting e2064c8 fixes the issue, but your patch does not. So, yes, looks like you're very much on the right track but not quite there. I'll be available to try other patches. Just let me know |
The commit just added to this PR should give you your answer. Run it again and see what it prints to console. |
08484d5
to
5dd5283
Compare
Have done now. Currently have quite a lot running through the tunnel when it's up, so the output is quite busy:
I believe |
Assuming it's not working still, as nothing changed other than the logging. Looks like Proxmox is passing through a body in a type of request that doesn't usually have a body. Although web standards advise against it, it's not forbidden, so should probably be supported. You can try refreshing this branch and trying again. It should work. And it should also print to console to confirm the method and body length. |
Just built and checked: yes, it does indeed work 👍 Otherwise, I suppose this is really an xterm.js issue, since that's actually the implementation of the console. I suppose I could make an issue over there, although you may be better placed to explain what they're doing that might be a little non-standard? |
Anything in the console? 'length of body:' or 'method'? |
So the issue is a GET with a body? Yes that is weird
|
4ca5ad9
to
7a74b15
Compare
Still available to test anything for the time being. Or otherwise if you don't need any more, I'll restore from my backup and await the fixed version |
It's not actually the outcome I expected. It seems the requests are being sent as normal, but empty POST requests are what changed. You could try again with the new commit here. |
Just tested 49bb66b and it also works |
Since we were using Xterm, we ended up exploring WebSocket issues, which turned out to be unrelated. It appears that the commit in the latest release was designed to check for specific request methods: "GET", "HEAD", "DELETE", "OPTIONS", "PROPFIND", "SEARCH". If the request matched one of these methods, the request body would be set to empty. If it didn’t match, the body wouldn’t be modified. However, it seems the commit didn’t account for requests like POST, which can also have an empty body. Since POST wasn’t included in the predefined list, the request body wasn’t being set to empty when necessary. Great job with the debugging! |
Great stuff! And thanks for taking this @maggie44 |
Fixed for now by reverting the original commit: f407dbb |
It appears that the commit in the latest release (e2064c8) was designed to check for specific request methods:
"GET", "HEAD", "DELETE", "OPTIONS", "PROPFIND", "SEARCH"
. If the request matched one of these methods, the request body would be set to empty. If it didn’t match, the body wouldn’t be modified. However, it seems the commit didn’t account for requests like POST, which can also have an empty body. Since POST wasn’t included in the predefined list, the request body wasn’t being set to empty when necessary.Closes: #1337