Repeated queries are not handled correctly #157
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#157
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If a page is loaded with a query, so the URL is now
gemini://example.com/page?querytext
, and then that page returns a status code 10, for input using another query, bombadillo requests this URL after the user types in the second input:gemini://example.com/page?querytext?secondquery
. As far as I can tell, this is incorrect. The query part should be replaced, not appended to.From my knowledge of Go (but not bomadillo source), the fix should be to parse the current page's URL, replace the query field, then get the new URL string, not just append to it.
This might be worth bringing up on the mailing list, definitely something Sean should add to the client torture tests. I'm too tired now, but anyone who sees this feel free to do it and link back here.
Multiple queries are not parsed correctlyto Repeated queries are not handled correctlyAdditionally, query strings are not being escaped when they are sent to the server. This is a quick fix with
url.QueryEscape
from"net/url"
, but it's important to stay within RFCs.That is weird. That had been an earlier issue a long while back and I thought that got fixed. I guess we either regressed or I never got around to fixing it!
I can add this to the list of things to fix for this weekends release as this is a very easy fix. Thanks for bringing it to my attention!
This has now been addressed in #159
The PR does not include querystring encoding as the spec does not directly include it and the gemini search engines do not support it (they do not unencode a querystring before passing it to their search). Since we do not want to break functionality for users I am putting of escaping for now. However, the issue of querystring chaining has been resolved once that PR merges in.
This has been closed per #160
Re: the querystring escaping issue:
I have posted to the mailing list to ask about escaping querystrings and see about getting that specifically added to the spec (as I agree, it is a good call to follow the standards in this case). Since it does not seem to be the widely used current practice on gemini I have left things in that regard as is for now, but will open a new issue when something is landed on.
The spec doesn't need to include it, because it's explicitly part of the URL RFC that gemini makes use of. As far as I can tell, any client that doesn't encode the query string is breaking that RFC. I think that Bombadillo should follow the RFC here, and that the rest of gemini space should adjust if necessary.
I will email Natalie (GUS developer) about this, because this is her problem, or her library's problem.
I just read the mailing list stuff, and solderpunk seems to agree. Could this issue be reopened, and the query stuff added, maybe as v2.3.1?
@makeworld I have added a new issue (since this issue was really about querystring chaining anyway): #161
I would expect a patch sometime later in the week (as
2.3.1
), but possibly as early as tomorrow.This is still an issue with the latest Bombadillo, where second and third queries are appended - could you reopen it? I experienced this at
gemini://gemini.conman.org/hilo/
, it's a good site to test this issue. Try guessing for the number, and there will be an error on your second guess.Ah. I see. I did not even know what he is doing there was a possible thing. I misunderstood what you meant by repeated queries and thought you meant that if a url already had a query element that a new one would replace it. Which is happening. But because a status 1x response does not trigger a render (or a point in navigation history - an eventual 2x response will do those things though) in bombadillo another one being sent in response to an initial one will create a strange loop where that doesnt happen. There may actually be more wrong than just that. It really had never occurred to me that a status 1 response would then trigger another status 1 response. I dont care for that. :-/
I would prefer that this gets a new issue added making it explicit that this has more to do with a status 1x response triggering another status 1x response than replacing a querystring on an existing URL.
Feel free to add it and reference this issue. If I get a chance later I'll do so if you have not already.
👍
On second thought, I am going to reopen this. It turned out to be bad test availability during the previous fix (I didnt have a good reference for this specific situation and no access to a server with cgi support to replicate it on my own) and a reference to the wrong var in the original fix. My bad :-/
Your link to Sean's example was so useful that I think I may want to amend out issue policies, when bug reporting at least, to always include:
bombadillo -v
I will add a card to get that to happen.
PR #166 is open to resolve the issue. Feel free to pull the branch it references if you would like to test it locally.
Thanks a lot!
I am closing this as resolved. I verified both items are currently fixed in the
develop
branch. Not sure why this did not get closed at the time. If anything further with this issue is notices, comment here and I'll re-open.