Skip to content

Commit

Permalink
ref: adds a small spec to check for non-ascii fields on the path para…
Browse files Browse the repository at this point in the history
…m for Net::HTTPRequest

Signed-off-by: Raul Ascencio <[email protected]>
  • Loading branch information
rascencio-kraft committed Sep 27, 2024
1 parent d1b3f6c commit 801e55e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions sentry-ruby/spec/sentry/net/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,22 @@
end
end

it "supports non-ascii characters in the path" do
stub_normal_response

uri = URI('http://example.com')
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new('/path?q=øgreyfoss&å=vær')

transaction = Sentry.start_transaction
Sentry.get_current_scope.set_span(transaction)


response = http.request(request)

expect(response.code).to eq("200")
end

it "adds sentry-trace header to the request header" do
uri = URI("http://example.com/path")
http = Net::HTTP.new(uri.host, uri.port)
Expand Down

0 comments on commit 801e55e

Please sign in to comment.