Skip to content

Custom responses using tls #52

Description

@kurobeats

Forgive me if I've missed something but I'm trying to set up a web server that will respond to POST requests but I'd like to encrypt the communication. Here's my rule file:

rules:
  - match: hey 
    response: |
              HTTP/1.0 200 OK
              Server: httpd/2.0
              x-frame-options: SAMEORIGIN
              x-xss-protection: 1; mode=block
              Date: Fri, 16 Apr 2021 14:30:32 GMT
              Content-Type: text/html
              Connection: close

              hello

But when run with the following (a few I've tried), I get errors thrown from curl:

Server: simplehttpserver -tcp -rules rules.yaml -listen localhost:443
Request: $ curl -X hey https://localhost/ curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:443

Server: simplehttpserver -rules rules.yaml -tcp -tls -domain localhost -listen localhost:443
Request: $ curl -X hey https://localhost/ curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:443

Am I missing something? It works fine so long as I'm not trying to encrypt.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Priority: LowThis issue can probably be picked up by anyone looking to contribute to the project, as an entry fixStatus: CompletedNothing further to be done with this issue. Awaiting to be closed.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions