Skip to content

Non-ASCII app name causes Invalid HTTP header field value in X-Stream-Client #1283

Description

@trejdych

Hello

After updating stream_video_flutter to 1.4.1, Stream Video requests fail when the application display name contains non-ASCII characters.

The SDK reads the application name from PackageInfo.appName and includes it directly in the X-Stream-Client HTTP header.

For an application named Giggó Dart's HTTP client rejects this header before the request is sent:

FormatException: Invalid HTTP header field value:
  "stream-video-flutter-v1.4.1|app=[DEV] Giggó|app_version=2.5.1|os=android 16|
  device_model=Nothing A142"

Steps to reproduce

  1. Set the Android or iOS application display name to a value containing a non-ASCII character, for example Giggó.
  2. Initialize StreamVideo.
  3. Make a coordinator API request, such as creating or joining a call.
  4. The request fails while setting the X-Stream-Client header.

Expected behavior

The SDK should ensure that X-Stream-Client contains only valid HTTP header characters.

Values collected from the platform, including:

  • application name
  • device model
  • OS name and version
  • browser name

should be sanitized or encoded before being added to the header.

Alternatively, instead of collecting application and device metadata automatically, the SDK could expose a public interface allowing integrators to explicitly provide the metadata they want to send:

StreamVideoOptions(
  clientMetadata: StreamVideoClientMetadata(
    appName: 'Giggo',
    appVersion: appInfo.version,
    deviceModel: null,
  ),
);

package_info_plus and device_info_plus would not be needed as SDK dependency then.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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