r4236 gwSendFile(): add type check