Fix issues #388 & #705

(thanks to @sourcejedi, PR #1326 for pointing inconsistencies with RFC2616
2 files changed