jhthorsen/mojo-tftpd — pull request #1 by hemmop (2013-08-09 11:53:36+00:00)
Title: Updates to support Mojolicious >= 3.97 and data blocks > 508 Byte

Hi Jan-Henning.

In Mojolicious 3.97 the URL-parsing scheme in Mojo::URL changed in a non-backward compatible way. Instead of using Mojo::URL, I've included a new parser sub, which sort of mimics the old behavior of Mojo::URL (but simpler).

I did also note that any TFTP-transfers larger than 508 Byte fails. The RFC specifies that any *data block* less than 512 Byte signals the last block in the transfer (see RFC 1350, section 6 "Normal termination"). By limiting the block size to 508 Byte, you will never transfer any file over that size. Instead of hard-coding another limit, I added the attribute 'blocksize' to pave the ground for a later support of RFC 2348.

I have added unit tests for both changes.

Kind regards, Pelle