bug in tool fetch?

I found some strange behavior in /tool fetch:

Trying to send a telegram message doesn’t work if there is a blank space followed with a capital ‘H’

Using a web browser, it works with both URLs. So, makes me think that Telegram API is fine

But, using fetch to send the same URL in a web server of mine, I didn’t see any reason to fail. All seems fine.

Can someone verify it?

ROS version is the 6.47.1 and trien on older with the same issue.

Not the first time I hear about that.
Now I was able to reproduce (earlier I tried only with H in the beginning).
v.6.46.1 and 6.45.9

Good to know that I’m not alone in this world suffering with odd bugs! XD

I just test with this texts.

" Habia una vez" Fail
" habia una vez" Ok
“Habia una vez” Ok
“a Habia una vez” Fail
“%20habia una vez” Ok (Wait, what!?)
“a%20Habia una vez” Ok (Got it!)

Maybe, just maybe, the blank space before the H is encoded in other invisble character other that 0x20. One forbiden by Telegram.

Hello

It’s not a fetch bug.

Didn’t realize that when testing it via Chrome browser, it changes blank spaces with %20.

i just tried with (linux) curl command and the results are the same.

So, I think this is a Telegram API issue, not fetch.

Sorry to bother you.

It is not “a Telegram API issue”, it is “a HTTP URL issue”.
A HTTP URL cannot include spaces, they have to be encoded as %20 or + depending on the context.
When it appears to work without doing that, likely the part of the message after the first space is not sent in the message.
Remember over the HTTP protocol the request is sent as:
GET http://hostname.domain/urlparameters HTTP/1.1
Note the 3 parts of the request separated by spaces. When there are spaces inside the URL, it is indeterminate what the parser
in the server would do. Normally it will just reject the whole thing, apparently at Telegram they have some hack to check for
the " H" to see where the “HTTP/1.1” thing starts, but that really isn’t the right thing to do.

Encode all your spaces in your messages!

@pe1chl
Thanks for an insight.

You’re damn right.