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

NullPointerException in response.header(String, int) #1273

Open mpkusnierz opened 1 year ago

mpkusnierz commented 1 year ago

spark.http.matching.ResponseWrapper needs to override this method spark.Response.header(String, int) and call the delegate to add the int Header; otherwise this method throws a NullPointerException

java.lang.NullPointerException: null at spark.Response.header(Response.java:166)

lepe commented 1 year ago

Yes, I believe you are right. I fixed the code in the unofficial release-5, which I'm planning to release within the next week (if all goes smoothly).