Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Update/remove default headers using Extension Tool

jesantos
jesantos Posts: 12

Is there a way I can remove a default HTTP header being sent by response? for example, removing Content-Length key and value from the response headers.

Comments

  • williammccusker
    williammccusker Posts: 642 ✭✭✭

    Hi,

    The content-length header is generated as part of the HTTP specification. Are you asking how to sending the response using chunking? When sending a chunked response the content-length header is omitted. If you add a "transfer-encoding" header to the responder with the value set to "chunked" then the server will not set the content-length header.

    Or is there a different header you want removed?

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    In the case where there is no response body, open your Message Responder, click "Options > Message Exchange Pattern", then enable "Notification Only". Otherwise, if there is a message body, then the Content-Length header is required unless HTTP chunking is enabled.