A client SHOULD NOT send the fragment part of a URL to the server?

1. Petite Abeille (petite.abeille (a) gmail.com)

"A client SHOULD NOT send the fragment part of a URL to the server."
-- Sean Conner, Resource request format for Gemini' states, circa 2019-08-01
https://portal.mozz.us/gemini/gemini.conman.org/gRFC/0002

Such restriction is not reflected in the spec itself.

At the same time, the spec mentions header lines as "machine-readable 
representation of the internal structure of the document".

Could one reflect such structure using fragments?

E.g.:

gemini://gemini.circumlunar.space/docs/specification.gm#5.4+Core+line+types

Part of the gemini canon?

Link to individual message.

2. solderpunk (solderpunk (a) SDF.ORG)

On Tue, Jun 09, 2020 at 09:46:56PM +0200, Petite Abeille wrote:
> "A client SHOULD NOT send the fragment part of a URL to the server."
> -- Sean Conner, Resource request format for Gemini' states, circa 2019-08-01
> https://portal.mozz.us/gemini/gemini.conman.org/gRFC/0002
> 
> Such restriction is not reflected in the spec itself.
> 
> At the same time, the spec mentions header lines as "machine-readable 
representation of the internal structure of the document".
> 
> Could one reflect such structure using fragments?
> 
> E.g.:
> 
> gemini://gemini.circumlunar.space/docs/specification.gm#5.4+Core+line+types
> 
> Part of the gemini canon?

It's certainly something people have suggested.  I guess to make it work
reliably would require a very strict specification of how to transform
headings into fragments, which sounds fiddly and dull...

Either that, or we allow just numeric fragments like 3.2, which the
client is supposed to map to the second subsection of the third section.

Sounds like a pain to implement in terminal clients, at least.

Cheers,
Solderpunk

Link to individual message.

3. Matthew Graybosch (hello (a) matthewgraybosch.com)

On Tue, 9 Jun 2020 21:46:56 +0200
Petite Abeille <petite.abeille at gmail.com> wrote:

> gemini://gemini.circumlunar.space/docs/specification.gm#5.4+Core+line
> +types
> 
> Part of the gemini canon?

Why send the #5.4+Core+line+types part at all? Can't a client send the
URL without the anchor tag, and then use the anchor tag to automatically
scroll to the specified heading?

-- 
Matthew Graybosch           https://www.matthewgraybosch.com
#include <disclaimer.h>	    gemini://starbreaker.org
Harrisburg,PA	 	    gemini://demifiend.org
"Out of order?! Even in the future nothing works."

Link to individual message.

4. solderpunk (solderpunk (a) SDF.ORG)

On Tue, Jun 09, 2020 at 04:02:57PM -0400, Matthew Graybosch wrote:
> On Tue, 9 Jun 2020 21:46:56 +0200
> Petite Abeille <petite.abeille at gmail.com> wrote:
> 
> > gemini://gemini.circumlunar.space/docs/specification.gm#5.4+Core+line
> > +types
> > 
> > Part of the gemini canon?
> 
> Why send the #5.4+Core+line+types part at all? Can't a client send the
> URL without the anchor tag, and then use the anchor tag to automatically
> scroll to the specified heading?

Oh, sure, no need to send it to the server.  Sorry, I missed the that
was what Sean was originally talking about.

Cheers,
Solderpunk

Link to individual message.

5. Petite Abeille (petite.abeille (a) gmail.com)



> On Jun 9, 2020, at 22:02, Matthew Graybosch <hello at matthewgraybosch.com> wrote:
> 
>> gemini://gemini.circumlunar.space/docs/specification.gm#5.4+Core+line
>> +types
>> 
>> Part of the gemini canon?
> 
> Why send the #5.4+Core+line+types part at all? Can't a client send the
> URL without the anchor tag, and then use the anchor tag to automatically
> scroll to the specified heading?

Perhaps. How would that work?

=> gemini://gemini.circumlunar.space/docs/specification.gmi#5.4+Core+line+types
vs.
=> gemini://gemini.circumlunar.space/docs/specification.gmi

With the first link, a client could indeed scroll to the relevant header, if so inclined.

How does the second scenario works?

Link to individual message.

6. Petite Abeille (petite.abeille (a) gmail.com)



> On Jun 9, 2020, at 22:09, solderpunk <solderpunk at SDF.ORG> wrote:
> 
>> Why send the #5.4+Core+line+types part at all? Can't a client send the
>> URL without the anchor tag, and then use the anchor tag to automatically
>> scroll to the specified heading?
> 
> Oh, sure, no need to send it to the server.  Sorry, I missed the that
> was what Sean was originally talking about.

Aha! I see what you mean now. Yes, this could be handled solely on the 
client side. Thanks for the clarification.

Still, no harm down if the fragment hit the server, right? Or?

Link to individual message.

7. James Tomasino (tomasino (a) lavabit.com)

On 6/9/20 8:12 PM, Petite Abeille wrote:
> Perhaps. How would that work?
> 
> => gemini://gemini.circumlunar.space/docs/specification.gmi#5.4+Core+line+types
> vs.
> => gemini://gemini.circumlunar.space/docs/specification.gmi
> 
> With the first link, a client could indeed scroll to the relevant 
header, if so inclined.
> 
> How does the second scenario works?

Wouldn't it be infinitely easier and less vague to just use a line
number for the fragment? Everything else is line based, so it fits that
mindset well. It's also less likely to run into issues when someone has
odd characters or multi-character emoji in a heading.

Link to individual message.

8. Felix Queißner (felix (a) masterq32.de)

> Wouldn't it be infinitely easier and less vague to just use a line
> number for the fragment? Everything else is line based, so it fits that
> mindset well. It's also less likely to run into issues when someone has
> odd characters or multi-character emoji in a heading.

Any continuous numbering has the problem that the content needs to be
perfectly static. No matter if you use line numbers or heading index.

If I insert an introduction, a new sentence, update a date, ? the index
will break

Link to individual message.

9. Luke Emmet (luke (a) marmaladefoo.com)



On 09-Jun-2020 21:00, solderpunk wrote:
> On Tue, Jun 09, 2020 at 09:46:56PM +0200, Petite Abeille wrote:
>> "A client SHOULD NOT send the fragment part of a URL to the server."
>> -- Sean Conner, Resource request format for Gemini' states, circa 2019-08-01
>> https://portal.mozz.us/gemini/gemini.conman.org/gRFC/0002
>>
>> Such restriction is not reflected in the spec itself.
>>
>> At the same time, the spec mentions header lines as "machine-readable 
representation of the internal structure of the document".
>>
>> Could one reflect such structure using fragments?
>>
>> E.g.:
>>
>> gemini://gemini.circumlunar.space/docs/specification.gm#5.4+Core+line+types
>>
>> Part of the gemini canon?
> It's certainly something people have suggested.  I guess to make it work
> reliably would require a very strict specification of how to transform
> headings into fragments, which sounds fiddly and dull...
>
> Either that, or we allow just numeric fragments like 3.2, which the
> client is supposed to map to the second subsection of the third section.
>

The canonical way to do this in Markdown (and more widely on the web) 
seems to be lowercase kebab case of the alphabetic content, with single 
hyphens

So it would be

gemini://gemini.circumlunar.space/docs/specification.gm#core-line-types

This is much more robust than having an offset index like 3.2, which will 
break all the links if you add a new section 1 to the page. I will 
probably implement this scheme in GemiNaut when I get round to it. The 
case insensitivity means you can change your mind about title casing on 
the heading and things still generally work fine.

I think the behaviour can be the same as on the web where the fragment 
behaviour degrades well. If there is no such fragment, or the client does 
not support them, there is no scrolling to the offset.

I think it is just a matter for the client authors to agree on (where they 
implement it). If it is in the spec, or accompanying guidance that might 
be nice, but not essential at the moment.

Best wishes

  - Luke

Link to individual message.

10. solderpunk (solderpunk (a) SDF.ORG)

On Tue, Jun 09, 2020 at 10:20:12PM +0200, Petite Abeille wrote:
 
> Aha! I see what you mean now. Yes, this could be handled solely on the 
client side. Thanks for the clarification.
> 
> Still, no harm down if the fragment hit the server, right? Or?
> 

I guess robust servers *should* tolerate this without throwing an error.

Cheers,
Solderpunk

Link to individual message.

11. Luke Emmet (luke (a) marmaladefoo.com)



On 09-Jun-2020 21:26, solderpunk wrote:
> On Tue, Jun 09, 2020 at 10:20:12PM +0200, Petite Abeille wrote:
>
>> Aha! I see what you mean now. Yes, this could be handled solely on the 
client side. Thanks for the clarification.
>>
>> Still, no harm down if the fragment hit the server, right? Or?
>>
> I guess robust servers *should* tolerate this without throwing an error.
>
> Cheers,
> Solderpunk

Yes servers should definitely ignore any such fragment, which should 


The query part of the URI is for server processing, the fragment is 
always client side only as far as I understand it.

https://en.wikipedia.org/wiki/Fragment_identifier

  - L

Link to individual message.

12. colecmac (a) protonmail.com (colecmac (a) protonmail.com)

I agree, this makes sense. Servers should be able to handle and ignore it, but
clients should not be sending it at all either. The client I'm working on just
strips it out of any URL. It'd be nice to see this explained in the spec.

makeworld

??????? Original Message ???????
On Tuesday, June 9, 2020 4:29 PM, Luke Emmet <luke at marmaladefoo.com> wrote:

> On 09-Jun-2020 21:26, solderpunk wrote:
>
> > On Tue, Jun 09, 2020 at 10:20:12PM +0200, Petite Abeille wrote:
> >
> > > Aha! I see what you mean now. Yes, this could be handled solely on 
the client side. Thanks for the clarification.
> > > Still, no harm down if the fragment hit the server, right? Or?
> >
> > I guess robust servers should tolerate this without throwing an error.
> > Cheers,
> > Solderpunk
>
> Yes servers should definitely ignore any such fragment, which should
> not be sent to the server.
>
> The query part of the URI is for server processing, the fragment is
> always client side only as far as I understand it.
>
> https://en.wikipedia.org/wiki/Fragment_identifier
>
> -   L

Link to individual message.

---

Previous Thread: authority's userinfo?

Next Thread: Kristall browser