diff --git a/li/cil/oc/server/component/WirelessNetworkCard.scala b/li/cil/oc/server/component/WirelessNetworkCard.scala index faa7f7a99..a168cadce 100644 --- a/li/cil/oc/server/component/WirelessNetworkCard.scala +++ b/li/cil/oc/server/component/WirelessNetworkCard.scala @@ -12,6 +12,7 @@ import net.minecraft.server.MinecraftServer import net.minecraft.tileentity.TileEntity import scala.collection.convert.WrapAsScala._ import scala.language.implicitConversions +import java.nio.charset.MalformedInputException class WirelessNetworkCard(val owner: TileEntity) extends NetworkCard { override val node = api.Network.newNode(this, Visibility.Network). @@ -87,6 +88,8 @@ class WirelessNetworkCard(val owner: TileEntity) extends NetworkCard { catch { case e: FileNotFoundException => context.signal("http_response", address, Unit, "not found: " + Option(e.getMessage).getOrElse(e.toString)) + case _: MalformedInputException => + context.signal("http_response", address, Unit, "binary data not yet supported") case e: Throwable => context.signal("http_response", address, Unit, Option(e.getMessage).getOrElse(e.toString)) } diff --git a/reference.conf b/reference.conf index ebe66eeb2..957cda471 100644 --- a/reference.conf +++ b/reference.conf @@ -573,11 +573,9 @@ opencomputers { # blacklist is always applied, so if an entry is present in both the # whitelist and the blacklist, the blacklist will win. # All entries are regular expression patterns, but they will only be - # applied to the host name (domain) of a given URL. - whitelist: [ - "^gist\\.github\\.com$" - "^(:?www\\.)?pastebin\\.com$" - ] + # applied to the host name (domain) of a given URL. Examples: + # "^gist\\.github\\.com$", "^(:?www\\.)?pastebin\\.com$" + whitelist: [] } # Other settings that you might find useful to tweak.