Skip to content

Commit 0551b95

Browse files
author
prosac
committed
only tries to use gsub on header value if it is not Numeric
1 parent 36a0c41 commit 0551b95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rspec_api_documentation/curl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def format_header(header)
6969
end
7070

7171
def format_full_header(header, value)
72-
formatted_value = value ? value.gsub(/"/, "\\\"") : ''
72+
formatted_value = value ? value.gsub(/"/, "\\\"") : '' unless value.is_a?(Numeric)
7373
"#{format_header(header)}: #{formatted_value}"
7474
end
7575

0 commit comments

Comments
 (0)