mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 10:51:55 -04:00
moved example whitelist entries to comment so we default to using the blacklist as suggested in #19; better message when http api fails parsing binary data (see #21)
This commit is contained in:
parent
28c504d342
commit
22bcc5756e
@ -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))
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user