Skip to content

Request body length mismatch after v2.2.0 #555

Closed
@dysonfrost

Description

@dysonfrost

The latest release (v2.2.0) introduced a bug that causes the action to fail with the error: Error: Request body length does not match content-length header.

This error occurs in our workflow when uploading assets to a release. This issue was not present in prior versions of the action.

Steps to reproduce:

  1. Set up a GitHub Actions workflow with the following snippet:
- name: Upload Asset
  uses: softprops/action-gh-release@master
  with:
    target_commitish: ${{ inputs.sha }}
    tag_name: ${{ inputs.name }}
    files: ./path/to/assets.zip
    append_body: true
    body: |-
      ### Artifacts
      * `Release asset` - assets.zip
  1. Trigger the workflow with the appropriate inputs.

Expected Behavior:

The workflow completes successfully, and the asset (assets.zip) is uploaded to the GitHub release with the specified body content.

Actual Behavior:

The workflow fails with the following error:
Error: Request body length does not match content-length header

GHA Output:

Run softprops/action-gh-release@master
Found release *** (with id=190203584)
⬆️ Uploading assets.zip...
Error: Request body length does not match content-length header

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