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

Fix play url and add additional curl header #3348

Merged
merged 2 commits into from Jan 28, 2022

Conversation

shaunduncan
Copy link

Hi!

I was having some trouble getting :GoPlay to actuall work correctly - the share would "work" but the resulting url was a 404. I discovered two small issues after looking at the play site's source code that I have included in this patch:

  1. The go.dev url needed an additional /p/ item in the url path, otherwise it will 404
  2. The curl needed to explicitly specify the content type as text/plain, otherwise the resulting play share is just url encoded text.

I also noticed that the share url was not using https, so I modified that as well.

Thanks!

@bhcleek
Copy link
Collaborator

bhcleek commented Jan 28, 2022

Thank you for contributing. I'll merge this as soon as tests pass.

I suspect the play site changed again; this was definitely working shortly after play.golang.org transitioned to go.dev/play.

@bhcleek bhcleek added this to the vim-go 1.26 milestone Jan 28, 2022
@bhcleek bhcleek merged commit d83c9db into fatih:master Jan 28, 2022
bhcleek added a commit that referenced this pull request Jan 28, 2022
@telemachus
Copy link

I suspect the play site changed again; this was definitely working shortly after play.golang.org transitioned to go.dev/play.

For what it's worth, you must be right. I was using it without trouble just last week. (Not a big deal, but I figured it'd be nice to know you're not imagining things!)

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.

None yet

3 participants