rack middleware for packaging form submission