summaryrefslogtreecommitdiff
path: root/test/net/http/utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/net/http/utils.rb')
-rw-r--r--test/net/http/utils.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/net/http/utils.rb b/test/net/http/utils.rb
index 53f3be0b88..e343e16712 100644
--- a/test/net/http/utils.rb
+++ b/test/net/http/utils.rb
@@ -81,7 +81,11 @@ module TestNetHTTPUtils
end
def do_GET(req, res)
- res['Content-Type'] = $test_net_http_data_type
+ if req['Accept'] != '*/*'
+ res['Content-Type'] = req['Accept']
+ else
+ res['Content-Type'] = $test_net_http_data_type
+ end
res.body = $test_net_http_data
res.chunked = @chunked
end