ecdavis/pants — pull request #62 by nikola (2014-10-21 13:21:57+00:00)
Title: Added fixes for WebSocket issues, and extended FileServer

I have seen error 53 (ECONNABORTED) pop up a few times when sending data over WebSockets. My investigation yields that the error is actually harmless, but still annoying when littering the log, so I've extended the error handling code to cover this gracefully.

Also, on at least one occasion __length__ was an unpacked tuple with 1 item. Unpacking results in correct behavior, i.e. no truncation of data.

The third change is with regards to the default fallback headers in __send_file__, which always take effect when serving from the FileServer because there was no actual propagation of headers defined elsewhere. More specifically, the default 'max-age=604800' turned out to be an issue in my application, so instead of changing the default I have added a headers= kwarg to __FileServer()__.