Skip to content

HEAD response body set to non-binary empty string #13

@phluid61

Description

@phluid61

File: lib/ruby-h2/application.rb:66

q.instance_variable_set :@body, ''

@body is initialised as String.new.b (binary encoding) throughout the codebase. Setting it to '' (UTF-8) changes the encoding, which could cause Encoding::CompatibilityError if anything downstream concatenates it with binary strings.

Fix: use '\.b instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions