Skip to content

[Bug] HTTP func fails with Failed to get file size for URI #66527

Description

@zghong

Search before asking

  • I had searched in the issues and found no similar issues.

Version

4.1.2, master

What's Wrong?

When querying a GET pre-signed object-storage URL via the HTTP(), the query fails with 403 Forbidden while getting the file size:

(1105, 'errCode = 2, detailMessage = Can not build http(): errCode = 2, detailMessage = Failed check http storage props, Failed to get file size for URI: http://.../xxx.txt?Expires=...&Signature=.... java.io.IOException: HTTP request failed with response code: 403, message: Forbidden')

What You Expected?

Query OK.

How to Reproduce?

SELECT * FROM HTTP(
    uri='http://storage.xx.local/20260128170024.txt?Expires=xx&AccessKey=xx&Signature=xx',
    format="csv")
limit 10;

The exact same URL works fine with a GET request:

wget http://storage.xx.local/20260128170024.txt?Expires=xx&AccessKey=xx&Signature=xx   # returns 200

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions