Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

SNI not set #168

Open
jkransen opened this issue Jun 15, 2018 · 1 comment
Open

SNI not set #168

jkransen opened this issue Jun 15, 2018 · 1 comment

Comments

@jkransen
Copy link

jkransen commented Jun 15, 2018

This is the code I use to connect to a remote server:

val postUrl = "https://api.luftdaten.info/v1/push-sensor-data/"
val response = Http(postUrl).headers(Seq("X-PIN" -> "1", "X-Sensor" -> s"fijnstof-${report.id}")).postForm(Seq("P1" -> report.pm10.toString, "P2" -> report.pm25.toString)).option(HttpOptions.allowUnsafeSSL).asString
log.debug(s"Luftdaten: $response")

The response I get is a 403 Forbidden with:

Reason: The client software did not provide a hostname using Server Name Indication (SNI), which is required to access this server.`

I tried setting System.setProperty("jsse.enableSNIExtension", "true"), even though the underlying java.net.HttpsURLConnection is said to default to true.

Is this a bug, or am I missing something?

@hoffrocket
Copy link
Member

hoffrocket commented Jun 19, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants