Backport #1346 and #1360 to 2.0 branch
Merge pull request #1382 from jroper/100-continue-20

Backport 100 continue fixes to 2.0.x branch