Skip to content

forbidden requests due to missing user-agent header in URL engine #34239

@geertvanbommel

Description

@geertvanbommel

Some URLs expect a User-Agent header.

Example (version 22.2.1.3767):

SELECT * FROM url('https://api.github.com/users/clickhouse','JSONAsString');

Results in:

Code: 86. DB::Exception: Received error from remote server /users/clickhouse. HTTP status code: 403 Forbidden, body: 
Request forbidden by administrative rules. Please make sure your request has a User-Agent header (http://developer.github.com/v3/#user-agent-required). Check https://developer.github.com for other possible causes.
: While executing URL. (RECEIVED_ERROR_FROM_REMOTE_IO_SERVER) (version 22.2.1.3767)

Maybe it's nice to always send a header along, something like User-Agent: ClickHouse/22.2.1.3767 ?

Metadata

Metadata

Assignees

Labels

easy taskGood for first contributorsunexpected behaviourResult is unexpected, but not entirely wrong at the same time.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions