GNU bug report logs - #22789
25.1.50; In last master build https connections stop working

Previous Next

Package: emacs;

Reported by: José L. Doménech <j_l_domenech <at> yahoo.com>

Date: Wed, 24 Feb 2016 10:29:02 UTC

Severity: normal

Found in version 25.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alain Schneble <a.s <at> realize.ch>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, j_l_domenech <at> yahoo.com, 22789 <at> debbugs.gnu.org
Subject: bug#22789: 25.1.50; In last master build https connections stop working
Date: Mon, 7 Mar 2016 17:47:43 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Alain Schneble <a.s <at> realize.ch>
>> CC: <larsi <at> gnus.org>, <j_l_domenech <at> yahoo.com>, <22789 <at> debbugs.gnu.org>
>> Date: Mon, 7 Mar 2016 00:24:35 +0100
>> 
>> > I'll send a patch for further discussions shortly.
>> 
>> And here it is.  The fix is quite simple.  It ensures that sys_write
>> exits before touching the socket if it is not connected yet.
>> Unfortunately I didn't find any documentation on winsock ioctlsocket
>> that would prove that this is indeed required.  But it seems not wrong
>> to me anyway.  (I'll try to search the wisock documentation tomorrow to
>> find some hints that lead in this direction, or maybe you know?)
>
> I think this change should be installed regardless, as it fixes an
> oversight.  However, I think it needs to be augmented, because the
> fact that FILE_CONNECT flag is set doesn't necessarily mean the
> connection is in progress: it could have failed already.  We need to
> look at the status as well.

Thank you.  I'll study the state table later...

> So we should only return EWOULDBLOCK when FILE_CONNECT is set _and_
> the status is not STATUS_CONNECT_FAILED.  If FILE_CONNECT is set, but
> the status is STATUS_CONNECT_FAILED, we should instead return the
> value computed from cp->errcode (if it is non-zero).  There's an
> example of that in sys_read.

Ok, thanks for this information.  I'll read through that code once
again...

> Other than that, what specific problem does your change try or is
> known to solve?  IOW, what didn't work before the change, and works
> after it?

Aha.  Sorry, I was not clear about that.

It fixes all the reproducible issues I had when "asynchronously" loading
a website with images in eww on MS-Windows
(e.g. https://www.microsoft.com).  gnutls_handshake returned with
arbitrary failures when loading the images.  It returned with errors -15
GNUTLS_E_UNEXPECTED_PACKET or -110 GNUTLS_E_PREMATURE_TERMINATION,
followed by -10 GNUTLS_E_INVALID_SESSION.  It happend all the time, but
arbitrarily only for some of the images.  The affected images were not
downloaded and displayed in eww at all because the GnuTLS session could
not be established.





This bug report was last modified 9 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.