WaifUPnP
WaifUPnP copied to clipboard
Fixed junk null byte issue
This patch fixes a very specific problem found on some routers. In the XML output, a NUL byte is added to the end of the file, which prevents parsing of the XML file, causing port forwarding to fail.
After manually removing the garbage, port forwarding works fine. In the upnpc utility, this problem was solved with the -i flag (a.k.a. ignore errors).
P.S. I'd like to use try-with-resource block, but that would require upgrading to Java 7 minimum.