~adnano/gemini

2 2

Genini requests with ncat

Details
Message ID
<i635v_2YJ3FgPKeqyJUB5XWa9uBLJ3K20m2Tv-fATFwb9zPCqbQj2JGMZzk7yInBP2Oz8T1T_dbTgjkYZFwSclHvIuOYyfdO48LM8sr6Puk=@protonmail.com>
DKIM signature
missing
Download raw message
Hi there,

I am trying to make gemini requests with ncat and have hit a bit of a stumbling block that I am not sure how to solve so was wondering if anyone here knew what was going on.

If i make a request as such:

echo -e ?gemini://gemini.conman.org\r\n? | ncat ?ssl ?gemini.conman.org? >page.out

I get the expected index page from gemini.conman.org printed into a file.

However if i try the same with

echo -e ?gemini://gemini.circumlunar.space\r\n? | ncat ?ssl ?gemini.circumlunar.space? >page.out

I get a 31 redirect. If i try that redirect address which is the same but with a / on the end of the url then the requests fails Where in would expect the gemini.circumlunar.space home page to be output to a file.

I feel like there is something obvious I am missing.

Anyone done this and know whats wrong?
Details
Message ID
<723f24b9-b988-a850-4079-5cdbd39e5453@typed-hole.org>
In-Reply-To
<i635v_2YJ3FgPKeqyJUB5XWa9uBLJ3K20m2Tv-fATFwb9zPCqbQj2JGMZzk7yInBP2Oz8T1T_dbTgjkYZFwSclHvIuOYyfdO48LM8sr6Puk=@protonmail.com> (view parent)
DKIM signature
missing
Download raw message
On 22/09/2020 17:18, James Henderson wrote:
> Hi there,
> 
> I am trying to make gemini requests with ncat and have hit a bit of a 
> stumbling block that I am not sure how to solve so was wondering if 
> anyone here knew what was going on.
> 
> If i make a request as such:
> 
> echo -e ?gemini://gemini.conman.org\r\n? | ncat ?ssl ?gemini.conman.org? 
>  >page.out
> 
> I get the expected index page from gemini.conman.org printed into a file.
> 
> However if i try the same with
> 
> echo -e ?gemini://gemini.circumlunar.space\r\n? | ncat ?ssl 
> ?gemini.circumlunar.space? ?>page.out
> 
> I get a 31 redirect. If i try that redirect address which is the same 
> but with a / on the end of the url then the requests fails Where in 
> would expect the gemini.circumlunar.space home page to be output to a file.
> 
> I feel like there is something obvious I am missing.
> 
> Anyone done this and know whats wrong?

echo -e "gemini://gemini.circumlunar.space/\r\n" | ncat --ssl 
"gemini.circumlunar.space" 1965  >page.out
works here, just added the slash and the port.
Details
Message ID
<1sRFt5B0es2XvX9aACukRujbuschab7DZy4Ss2_R9qTir7aRQix54BEB_9NiGLs5vTOqetOFGGS-x9LtKtM3Upr-Cf-eAWOet7SSZF-Kftw=@protonmail.com>
In-Reply-To
<723f24b9-b988-a850-4079-5cdbd39e5453@typed-hole.org> (view parent)
DKIM signature
missing
Download raw message
Aha I see what the problem was!

As it happened I had the port in the command but just neglected it in the message, my bad.

The fail was caused by putting the / on the end of the url being passed to ncat. With the / on the end of that the lookup fails it appears. Seeing your working command made it obvious.

Thanks.

On Tue, Sep 22, 2020 at 16:30, Julien Blanchard <julien at typed-hole.org> wrote:

> On 22/09/2020 17:18, James Henderson wrote:
>> Hi there,
>>
>> I am trying to make gemini requests with ncat and have hit a bit of a
>> stumbling block that I am not sure how to solve so was wondering if
>> anyone here knew what was going on.
>>
>> If i make a request as such:
>>
>> echo -e ?gemini://gemini.conman.org\r\n? | ncat ?ssl ?gemini.conman.org?
>> >page.out
>>
>> I get the expected index page from gemini.conman.org printed into a file.
>>
>> However if i try the same with
>>
>> echo -e ?gemini://gemini.circumlunar.space\r\n? | ncat ?ssl
>> ?gemini.circumlunar.space? >page.out
>>
>> I get a 31 redirect. If i try that redirect address which is the same
>> but with a / on the end of the url then the requests fails Where in
>> would expect the gemini.circumlunar.space home page to be output to a file.
>>
>> I feel like there is something obvious I am missing.
>>
>> Anyone done this and know whats wrong?
>
> echo -e "gemini://gemini.circumlunar.space/\r\n" | ncat --ssl
> "gemini.circumlunar.space" 1965 >page.out
> works here, just added the slash and the port.
Reply to thread Export thread (mbox)