Adds in the correct variable when checking for existing querystring value #166

Merged
sloum merged 2 commits from fix-repeated-query into release-2.3.1 2020-05-28 04:49:30 +00:00
Owner

During the rush up to 2.3.0 this was supposedly fixed, but I did not have a good test case. Since I do not have access to a server with cgi enabled I was not able to create a functional test for this. In theory I suppose this could have been split into its own method and then unit tested. That actually may be the way to go.

In any event, this should solve the immediate issue. To test/verify the fix:

go build
./bombadillo gemini://gemini.conman.org:1965/hilo/

You should be able to play the game without Sean's server sending you an error page.

This is in reference to issue #157

This PR also adds in query string escaping. Originally, using golang's QueryEscape spaces were being encoded as +. Which seemed... not wrong in the eyes of RFCs, but not workable for how many gemini servers are interested. It turns out using PathEscape will use %20, so hopefully this works well.

This second fix is in reference to issue #161

During the rush up to `2.3.0` this was supposedly fixed, but I did not have a good test case. Since I do not have access to a server with cgi enabled I was not able to create a functional test for this. In theory I suppose this could have been split into its own method and then unit tested. That actually may be the way to go. In any event, this should solve the immediate issue. To test/verify the fix: ``` go build ./bombadillo gemini://gemini.conman.org:1965/hilo/ ``` You should be able to play the game without Sean's server sending you an error page. This is in reference to issue #157 This PR also adds in query string escaping. Originally, using golang's `QueryEscape` spaces were being encoded as `+`. Which seemed... not wrong in the eyes of RFCs, but not workable for how many gemini servers are interested. It turns out using `PathEscape` will use `%20`, so hopefully this works well. This second fix is in reference to issue #161
sloum added the
bug
label 2020-05-26 02:21:42 +00:00
Collaborator

Confirmed working using that test. Plus did the other checks like make test and it was fine. Cool! Bombadillo's prompt when playing that game works really well.

Confirmed working using that test. Plus did the other checks like make test and it was fine. Cool! Bombadillo's prompt when playing that game works really well.
First-time contributor

It turns out using PathEscape will use %20, so hopefully this works well.

It looks like that will be the way the spec goes for sure, so it sounds like this is the right path! See this email.

> It turns out using PathEscape will use `%20`, so hopefully this works well. It looks like that will be the way the spec goes for sure, so it sounds like this is the right path! See [this email](https://lists.orbitalfox.eu/archives/gemini/2020/001069.html).
sloum closed this pull request 2020-05-28 04:49:30 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sloum/bombadillo#166
No description provided.