Project

General

Profile

Actions

Bug #12126

closed

[PATCH] openssl: accept moving write buffer for write_nonblock

Added by normalperson (Eric Wong) about 8 years ago. Updated about 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:74051]

Description

By setting the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag.
This flag was introduced at the same time as
SSL_MODE_ENABLE_PARTIAL_WRITE in OpenSSL 0.9.4 and makes usage
with non-blocking sockets much easier.

Before this, a Rubyist would need to remember the exact object
which failed to write and reuse it later when the socket became
writable again.  This causes problems when the buffer is given
by another layer of the application (e.g. a buffer is given
by a Rack middleware or application to a Rack web server).

* ext/openssl/ossl_ssl.c (ossl_sslctx_s_alloc):
  enable SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER by default

Related to https://bugs.ruby-lang.org/issues/12085

I'm not sure if this can be considered a bugfix which
should be backported. I have found write_nonblock usability to
be severely hampered by the lack if this flag.


Files


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #12085: [PATCH] openssl: document `exception: false' for *_nonblockClosedrhenium (Kazuki Yamaguchi)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0