Skip to content

"--logged-response-body-size-limit" is not truncating requests #140

@alex-levashev

Description

@alex-levashev

WireMock version: 3.13.2 (Docker image: wiremock/wiremock:3.13.2)

Description

The CLI flag --logged-response-body-size-limit appears to have no effect.
Even when explicitly set (e.g. --logged-response-body-size-limit=1000), WireMock logs the full request/response body without truncation.

This makes logs extremely large when dealing with binary files (e.g. audio uploads).

Reproduction

docker-compose.yml

services:
wiremock:
image: wiremock/wiremock:3.13.2
container_name: wiremock
ports:
- "8080:8080"
volumes:
- "./mappings:/home/wiremock/mappings"
entrypoint: [
"/docker-entrypoint.sh",
"--global-response-templating",
"--logged-response-body-size-limit=1000",
"--disable-banner"
]

Steps

  1. Start WireMock with docker-compose up
  2. Send any request containing a large file (e.g. multipart/form-data with a binary file)
  3. Inspect logs: the request/response body is fully logged, not truncated

Expected behavior

WireMock should truncate logged bodies to the size specified in --logged-response-body-size-limit.

Actual behavior

No truncation occurs — full binary content appears in logs.

Additional info

  • Reproducible on multiple environments
  • The flag seems to be ignored completely
  • The issue occurs even when using very low limits (e.g. 100 bytes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions