Add checking response body type to improve performance

Add checking response body type to improve server's performance.

If the response body type is T_ARRAY, using Array#join, else using Enumerator#to_enum.