Skip to content

Request failing to receive response. #196

@eldhosejoys

Description

@eldhosejoys

My proxy has the following setting:

  proxy = mockttp.getLocal({
    https: ca,
    http2: true,
    socks: false,
    recordTraffic: false,
    debug: false,
    passthrough: ['unknown-protocol'], 
  });

  proxy.forAnyRequest().thenPassThrough({
    simulateConnectionErrors: true,
    async beforeRequest(request: CompletedRequest) { },
    async beforeResponse(
      response: PassThroughResponse,
      request: CompletedRequest
    ) { },
  });

But if my response contain duplicate header for

x-content-type-options: nosniff
x-content-type-options: nosniff

this is throwing error as :

Failed to handle request: Header field "x-content-type-options" must only have a single value

Can't we just simply skip that throw? I use mockttp version 4.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions