excessive exits on error

Reorder logic

Testsuite: Range
$upstream array => HTTP::Headers conversion
