| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
| |
Origin: https://github.com/eventlet/eventlet/pull/517
Related:
https://github.com/eventlet/eventlet/pull/388
https://github.com/eventlet/eventlet/pull/303
https://github.com/eventlet/eventlet/issues/270
https://github.com/eventlet/eventlet/issues/132
|
| |
|
|
| |
Newer OpenSSL requires RSA key at least 2048 bits
|
| | |
|
| | |
|
| |
|
|
| |
Signed-off-by: Lon Hohberger <lon@metamorphism.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
getaddrinfo() behaves differently from the standard implementation as
it will try to contact nameservers if only one (IPv4 or IPv6) entry
is returned from /etc/hosts file.
This patch avoids getaddrinfo() querying nameservers if at least one
entry is fetched through the hosts file to match the behavior of
the original socket.getaddrinfo() implementation.
Closes #515
Signed-off-by: Daniel Alvarez <dalvarez@redhat.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Tests:
- normal operation
- no reply (timeout)
- unexpected source address (w/ timeout &
ignore_unexpected set)
- number of zeroes in ipv6 address string different
- unexpected address
Signed-off-by: Lon Hohberger <lon@metamorphism.com>
|
| |
|
|
|
|
|
|
| |
If the source address for a packet did not match where we sent,
the udp() function would spin in an infinite loop and the timer
would never expire, causing the process to hang.
Signed-off-by: Lon Hohberger <lon@metamorphism.com>
|
| |
|
|
|
|
|
|
|
|
| |
When performing DNS lookups, the source address from resolv.conf
may have stray zeroes in it, or the address string returned from
socket.recvfrom may. Purge them before comparing tuples.
Resolves: rhbz#1607967
Signed-off-by: Lon Hohberger <lon@metamorphism.com>
|
| |
|
|
| |
installation and development
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Closes #488; for some additional context, see #468 and #467.
PEP-0333 says [1]
> all strings referred to in this specification **must** be of type ``str``
but muddied that message earlier with a bunch of talk about
> all strings passed to or from the server must be standard Python byte
> strings, not Unicode objects
PEP-3333 sought to clarify [2] with
> WSGI therefore defines two kinds of "string":
>
> * "Native" strings (which are always implemented using the type
> named ``str``) that are used for request/response headers and
> metadata
>
> * "Bytestrings" (which are implemented using the ``bytes`` type
> in Python 3, and ``str`` elsewhere), that are used for the bodies
> of requests and responses (e.g. POST/PUT input data and HTML page
> outputs).
>
> Do not be confused however: even if Python's ``str`` type is actually
> Unicode "under the hood", the *content* of native strings must
> still be translatable to bytes via the Latin-1 encoding!
And later, in "Unicode Issues" [3], it adds
> For values referred to in this specification as "bytestrings"
> (i.e., values read from ``wsgi.input``, passed to ``write()``
> or yielded by the application), the value **must** be of type
> ``bytes`` under Python 3, and ``str`` in earlier versions of
> Python.
So the upshot seems to be
- All request and response bodies must be bytes, regardless of Python
version.
- All headers and other WSGI environment keys need to be native
strings; i.e. bytes strings on Python 2 and unicode strings on
Python 3.
[1] https://www.python.org/dev/peps/pep-0333/#unicode-issues
[2] https://www.python.org/dev/peps/pep-3333/#a-note-on-string-types
[3] https://www.python.org/dev/peps/pep-3333/#unicode-issues
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An application that wants to accept UTF-8 header values on Python 2 can
do so fairly easily: since str is bytes, it can decode from UTF-8
directly and return appropriate errors if that decoding fails.
On Python 3, it gets a little more interesting. Since str is unicode,
the bytes-on-the-wire are decoded as Latin-1 before being put in the
WSGI environment, so the application must encode as Latin-1 then decode
as UTF-8. For the most part, this Just Works as the transformation
should be lossless.
Sometimes, however, headers get truncated on py3. This is the result
of a difference in how .strip() behaves for bytes vs unicode -- in
particular, there are some unicode characters that are considered
whitespace whose Latin-1 encoded byte string is not:
>>> [x for i in range(256) for x in (chr(i),)
... if x.isspace() and not x.encode('latin1').isspace()]
['\x1c', '\x1d', '\x1e', '\x1f', '\x85', '\xa0']
Looking at RFC 7230, it defines header fields as
a case-insensitive field name followed by a colon (":"), optional
leading whitespace, the field value, and optional trailing whitespace
where "whitespace" is limited to SP or HTAB. So, let's just strip *those*
from header values.
Note that (some versions of?) py2's mimetools.Message includes the
trailing CRLF, so strip that, too.
https://github.com/eventlet/eventlet/pull/504
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you have a pool with no free items, one greenthread blocked in
pool.get(), and then you call pool.put(item), sometimes the put will
block.
This happens when the greenthread blocked in pool.get() has a pending
timeout. The timeout's timer has fired, the call to throw() has been
scheduled, but throw() has not actually run yet. In pool.put(), we see
a waiting getter, so we do a blocking self.channel.put()... but when
the getter runs, it unwinds its stack and does not take the item,
leaving the caller of pool.put() blocked despite there being enough
free space.
This commit fixes that by (a) making LightQueue.put() and .get() work
with 0-length queues, even with timeouts, and (b) checking for
queue.Full in Pool.put() and handling it correctly.
https://github.com/eventlet/eventlet/pull/495
|
| | |
|
| | |
|
| | |
|
| |
|
| |
https://github.com/eventlet/eventlet/issues/479
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`greendns.HostsResolver.LINES_RE` doesn't admit the possibility of a
comment starting at the beginning of a line. This has been ignored since `is_ipv4_addr()` and `is_ipv6_addr()` catch `dns.exception.SyntaxError` and return `False`. But in a runtime environment that encounters #413, `dns.exception.SyntaxError` is not caught, and the
import fails.
Changing '+' to '*' allows `HostsResolver._readlines()` to recognize and skip
comment lines.
greendns.HostsResolver._readlines(), a purely internal method, now returns an
itertools generator rather than a list. Change relevant asserts to build a
list before comparing.
|
| | |
|
| |
|
|
|
|
| |
Thanks to Jake Tesler
https://github.com/eventlet/eventlet/issues/172
|
| |
|
|
|
|
| |
https://github.com/eventlet/eventlet/issues/469
https://github.com/eventlet/eventlet/pull/470
https://cosmicpercolator.com/2016/01/13/exception-leaks-in-python-2-and-3/
|
| |
|
|
| |
https://github.com/sourabhdeshmukh/eventlet/pull/1
|
| |
|
|
|
| |
https://www.python.org/dev/peps/pep-0333/#unicode-issues
https://github.com/eventlet/eventlet/issues/468
|
| |
|
|
| |
https://github.com/eventlet/eventlet/issues/475
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
https://github.com/eventlet/eventlet/issues/402
|
| |
|
|
|
|
|
|
|
| |
Hostname in /etc/hosts are not case-sensitive, this fixes
HostsResolver() accordingly.
eventlet#458
Co-Authored-By: Thomas Bechtold <tbechtold@suse.com>
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
https://github.com/eventlet/eventlet/pull/450
|
| |
|
|
| |
Directly depend on enum34, scoping requirement to < Python 3.4.
|
| |
|
|
|
|
|
|
|
|
| |
While processing a WSGI request, if the remote client forcefully
resets the connection while the request data is being read from the
socket (e.g. HAProxy health check), the ECONNRESET socket error is
not properly handled and may end up being logged in strerr or in
a log file.
https://github.com/eventlet/eventlet/issues/446
|
| |
|
|
|
|
| |
PyOpenSSL deprecated OpenSSL.rand in 17.2.0 and removed it in 17.3.0.
To comply, update min version in tests to 17.3.0 and removes it.
https://pyopenssl.org/en/stable/changelog.html
|
| |
|
|
|
|
|
| |
and Peter Kovary
Support for compression extension as described in RFC7692 https://tools.ietf.org/html/rfc7692
https://github.com/eventlet/eventlet/pull/417
|
| |
|
|
|
|
|
|
|
|
| |
to Geoffrey Thomas
Force sooner find_library child process by early import monotonic.
Helps with gunicorn and possibly other applications.
https://github.com/eventlet/eventlet/issues/401
https://github.com/benoitc/gunicorn/issues/1584
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases -- notably with Python 2.7.13 and the default hub -- the
process of importing the hub involves calling code in a module we
monkey-patch. This leads to recursive imports: the first eventlet
function will call get_hub(), which will try to import the hub, which
will call a monkey-patched module, which will call get_hub() and try to
import the hub again.
To avoid this, make sure the hub is fully imported before
monkey-patching anything.
https://github.com/eventlet/eventlet/issues/401
|
| |
|
|
| |
https://github.com/eventlet/eventlet/issues/433
|
| | |
|
| |
|
|
| |
Fixes #430
|
| |
|
|
|
|
| |
to JacoFourie@github
https://github.com/eventlet/eventlet/issues/380
|
| |
|
|
| |
https://github.com/eventlet/eventlet/issues/427
|
| |
|
|
|
|
|
| |
Python 3.4+
Solved by always reading in binary mode with explicit decoding.
Plus: new hosts parser in regex, better comment handling.
|