perwendel / spark

A simple expressive web framework for java. Spark has a kotlin DSL https://github.com/perwendel/spark-kotlin
Apache License 2.0
9.63k stars 1.56k forks source link

How do I DISABLE HTTPS? #1248

Open Shizcow opened 2 years ago

Shizcow commented 2 years ago

How do you, after enabling HTTPS security via secure(), then disable HTTP security?

I'm writing some JUnit tests for code that, among another things, calls Spark.secure when a keystore is available. In order to test both branches (if keystore is/isn't available), I'd like to have one test run with secure and one test without.

However, if the secure test is ran first, the non-secure test still launches with HTTPS enabled. stop();awaitStop(); does not help in this regard -- the security seems to persist between tests.