Skip to content
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

Don't reopen during POSTs. #1205

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Don't reopen during POSTs. #1205

merged 1 commit into from
Aug 31, 2023

Conversation

zelch
Copy link
Contributor

@zelch zelch commented Aug 31, 2023

This can happen, for example, when something loads a file:// URL, that then has static form data and javascript to immediately submit it.

We then turn the POST with data in the default container into a GET with no data in the target container.

That doesn't work very well.

As such, let's just refuse to reopen a tab in a new container during a POST, we can't bring the data with us (that I've figured out how to do anyhow).

This was the actual problem that had me originally open #1200 .

This can happen, for example, when something loads a file:// URL, that
then has static form data and javascript to immediately submit it.

We then turn the POST with data in the default container into a GET with
no data in the target container.

That doesn't work very well.

As such, let's just refuse to reopen a tab in a new container during a
POST, we can't bring the data with us (that I've figured out how to do
anyhow).
@mbnuqw
Copy link
Owner

mbnuqw commented Aug 31, 2023

Thank you!

@mbnuqw mbnuqw merged commit cc0c2df into mbnuqw:v5 Aug 31, 2023
@mbnuqw
Copy link
Owner

mbnuqw commented Aug 31, 2023

We then turn the POST with data in the default container into a GET with no data in the target container.

I think, in this case it would be better to just handle only GET method (to avoid possible issues with other non-GET requests): dd44210

@zelch
Copy link
Contributor Author

zelch commented Aug 31, 2023

I think, in this case it would be better to just handle only GET method (to avoid possible issues with other non-GET requests): dd44210

I agree, however I'm going to strongly suggest that we still

delete tab.reopenInContainer

Otherwise, I believe, we may end up reopening in a new container on the next GET in the window.

Which doesn't sound bad, until the site that you're POSTing to sets cookies based on the POST data.

@mbnuqw
Copy link
Owner

mbnuqw commented Aug 31, 2023

I agree, however I'm going to strongly suggest that we still...

Oops, forgot about that. Thanks for noticing this.

@zelch
Copy link
Contributor Author

zelch commented Aug 31, 2023

No worries, I had a few... Missteps while figuring out what was going on. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants