Skip to content

[INF] Closing connection: no matched rule, Change behaviour to a custom default response #112

@brenocss

Description

@brenocss

Please describe your feature request:

Now: [INF] Closing connection: no matched rule
Expected: simple http response like interact sh

Describe the use case of this feature:

Currently, the simplehttp server in TCP mode accepts rules. However, when no rule is matched, it would be nice to have a way to customize the rules for a no-match scenario. For example:

rules:
  # HTTP Requests
  - default-http:
    name: default-http
    response: |
              HTTP/1.1 200 OK
              Content-Type: text/html; charset=utf-8
              Server: simplehttpserver
              simplehttpserver: 1.1.2
              Content-Length: 72
              Connection: close

              <html><head></head><body>{{randomString}}</body></html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementMost issues will probably ask for additions or changes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions