Skip to content

[client] BackendHandler: Error sending request: curl: (22) The requested URL returned error: 411 Length Required #7

@mefogle

Description

@mefogle

When the server is deployed to Google Cloud Run (or any server that enforces Content-Length), the curl request in buildCurlCommand fails resulting in an inability to pair a new device. This could be due to sending the POST without a "-d" parameter, resulting in the Content-Length header being generated with 0 length.

This was verified by logging the server-side headers when processing handlePairDevice :

[backend] {
[backend] host: 'xxxx.app',
[backend] 'user-agent': 'curl/7.73.0',
[backend] 'content-length': '0',
[backend] accept: '/',
[backend] 'x-forwarded-for': 'xx.xx.xx.xx',
[backend] 'x-forwarded-host': 'xxxx.app',
[backend] 'x-forwarded-proto': 'https',
[backend] 'accept-encoding': 'gzip'
[backend] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions