[#90399] [Ruby trunk Feature#14813] [PATCH] gc.c: make gc_enter+gc_exit pairs dtrace probes, too — ko1@...
Issue #14813 has been updated by ko1 (Koichi Sasada).
3 messages
2018/12/10
[#90417] [Ruby trunk Bug#15398] TestThread#test_signal_at_join fails on FreeBSD — naruse@...
Issue #15398 has been reported by naruse (Yui NARUSE).
4 messages
2018/12/11
[#90423] Re: [Ruby trunk Bug#15398] TestThread#test_signal_at_join fails on FreeBSD
— Eric Wong <normalperson@...>
2018/12/11
[email protected] wrote:
[#90519] Spoofing warnings for mail from bugs.ruby-lang.org — Charles Oliver Nutter <headius@...>
I'm getting a spoofing warning for emails sent from bugs.ruby-lang.org when
4 messages
2018/12/13
[#90522] Re: Spoofing warnings for mail from bugs.ruby-lang.org
— Eric Wong <normalperson@...>
2018/12/13
Charles Oliver Nutter <[email protected]> wrote:
[#90533] [Ruby trunk Feature#15413] unmarkable C stack (3rd stack) — normalperson@...
Issue #15413 has been reported by normalperson (Eric Wong).
3 messages
2018/12/14
[#90581] [Ruby trunk Bug#15424] Ruby 2.6.0rc1 & 2.6.0rc2 mutex exception — mat999@...
Issue #15424 has been reported by splitice (Mathew Heard).
3 messages
2018/12/17
[#90595] [Ruby trunk Bug#15430] test_fork_while_parent_locked is failing status on Ruby CI — hsbt@...
Issue #15430 has been reported by hsbt (Hiroshi SHIBATA).
3 messages
2018/12/18
[#90614] [Ruby trunk Bug#15430][Assigned] test_fork_while_parent_locked is failing status on Ruby CI — hsbt@...
Issue #15430 has been updated by hsbt (Hiroshi SHIBATA).
4 messages
2018/12/19
[#90630] Re: [Ruby trunk Bug#15430][Assigned] test_fork_while_parent_locked is failing status on Ruby CI
— Eric Wong <normalperson@...>
2018/12/20
> It still exists. https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181218T230003Z.fail.html.gz
[#90820] Re: [ruby-cvs:73697] k0kubun:r66593 (trunk): accept_nonblock_spec.rb: skip spurious failure — Eric Wong <normalperson@...>
[email protected] wrote:
3 messages
2018/12/30
[ruby-core:90749] [Ruby trunk Bug#15472] Invalid JSON data being sent from Net::HTTP in some cases with Ruby 2.6.0
From:
mseneadza@...
Date:
2018-12-27 18:58:22 UTC
List:
ruby-core #90749
Issue #15472 has been reported by mseneadza (Michael Seneadza).
----------------------------------------
Bug #15472: Invalid JSON data being sent from Net::HTTP in some cases with Ruby 2.6.0
https://bugs.ruby-lang.org/issues/15472
* Author: mseneadza (Michael Seneadza)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: 2.6.0p0
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
It seems that invalid (JSON) data is being sent once the request's body passes a size threshold. I'm sending emails via the sparkpost.com API using the sparkpost_rails gem ( https://github.com/the-refinery/sparkpost_rails ). That gem uses Net::HTTP to make its API calls.
I upgraded my app from Ruby 2.5.3 to Ruby 2.6.0 on December 25th. Yesterday, on the 26th, my app attempted to send its nightly emails to users. I was flooded with these errors from the API:
~~~
{ "errors": [ { "message": "invalid data format\/type", "description": "Problems parsing request as json", "code": "1300" } ] }
~~~
After some debugging / trial & error I discovered that the length of the email messages seemed to be the problem. I haven't nailed down the exact maximum length that will work but I know that if the request body is 16,511 characters long the message will be sent. If it's 17,396 characters it will fail.
I've also tried replacing Net::HTTP with the rest_client gem. The full-sized messages get sent with no problems using RestClient.
So I can replace this (https://github.com/the-refinery/sparkpost_rails/blob/master/lib/sparkpost_rails/delivery_method.rb#L379):
~~~
def post_to_api
url = "https://api.sparkpost.com/api/v1/transmissions"
uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path, @headers)
request.body = JSON.generate(@data)
http.request(request)
end
~~~
with
~~~
def post_to_api
url = "https://api.sparkpost.com/api/v1/transmissions"
RestClient.post(url, JSON.generate(@data), @headers)
end
~~~
and my (full-length, much larger than 17,396 characters) messages get sent with no problem.
I also tried logging the actual HTTP requests using the httplog gem (https://github.com/trusche/httplog) in Ruby 2.5.3 and 2.6.0. Unfortunately that showed the request payloads were identical. But I suspect that gem's logging does some conversion that isn't actually happening in the real data being sent to the SparkPost API.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>