jenius-apps / nightingale-rest-api-client

A modern, resource-efficient REST API client for Windows
https://nightingale.rest
MIT License
769 stars 36 forks source link

User agent header seems to be not sent #141

Closed dpaulino closed 3 years ago

dpaulino commented 4 years ago

According to reports

dpaulino commented 4 years ago

Can't seem to repro. See nightingale on the right supply a user-agent, and see aspnet core 5 on the left recognize that user-agent image

dpaulino commented 3 years ago

Closing as no repro

jtippet commented 3 years ago

The problem seems to involve the characters ;,<=>\?@[]{} (unless they are contained in parentheses) in the user-agent.

test works ok: image

te;st is silently ignored: image

t (e;s) t works ok: image

I think you can argue that these UAs are technically illegal (my reading of RFC 7231/7230 says that a UA must not contain any of (),/:;<=>?@[\]{} , except / is allowed once before a product-version token). But since Nightingale is a tool specifically for developers, I claim that Nightingale should ideally allow devs to break this rule, if they specifically ask to. By comparison, curl -A "a;b;;(),/:;<=>?@[\]{}" https://whatmyuseragent.com/ dutifully sends that tacky user agent to the server.

This isn't a completely theoretical problem -- here are some real-world UAs that Nightingale cannot send:

I'm not sure how Nightingale's HTTP client is implemented, but this suspicious item turns up in a web search.

MahdiGhiasi commented 2 years ago

I'm seeing the same behavior @jtippet explained.

Specifically, I was trying to repliacte Google's FeedFetcher bot request which contains a semicolon that is not contained in parantheses.

It is FeedFetcher-Google; (+http://www.google.com/feedfetcher.html), and Nightingale refuses to send this user agent.