perwendel / spark

A simple expressive web framework for java. Spark has a kotlin DSL https://github.com/perwendel/spark-kotlin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I DISABLE HTTPS?

Shizcow opened this issue · comments

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.