lib/flexirest/request.rb in flexirest-1.6.8 vs lib/flexirest/request.rb in flexirest-1.6.9

- old
+ new

@@ -522,10 +522,13 @@ end def handle_response(response, cached = nil) @response = response status = @response.status || 200 - @response.body = "{}" if @response.body.blank? + if @response.body.blank? + @response.response_headers['Content-Type'] = "application/json" + @response.body = "{}" + end if cached && response.status == 304 Flexirest::Logger.debug " \033[1;4;32m#{Flexirest.name}\033[0m #{@instrumentation_name}" + ' - Etag copy is the same as the server' return handle_cached_response(cached)