[noPoll] Cookie header bug and one question

Francis Brosnan Blázquez francis en aspl.es
Mar Mayo 19 09:26:01 CEST 2015


El mar, 19-05-2015 a las 00:11 +0200, ettore.rizza escribió:
> Hello, 


Hello Ettore,


> I'm evaluating your library for a possible use in one of my projects.
> I spend the entire day trying to create a wss client on windows
> platform. 
> At the end I was able to establish the connection with the server
> after fixing a little bug in the http header composition.
> If a cookie is present there is a wrong line ending sequence "\n\r"
> instead of "\r\n". 
> Line 302 of nopoll_conn.c "  (opts && opts->cookie) ? "\n\r" : "",
>   " 
> The server I was connecting to was refusing the connection with a "Bad
> Request" error. 


Upps! Thanks for reporting Ettore. Now fix is applied to SVN. For some
reason
server side implementation supports this without any complain. I'll
release the
fix soon,


> I would like to report you a problem in the
> nopoll-installer-0.2.9.b207-w32.exe. The libnopoll.dll depends on the
> missing libgcc_s_dw2.1.dll. I found this in a mingw distribution
> packages, so not a big problem, but I think it is good to know...


Ok, I've updated nopoll.nsi to have it included (to ease usage). 


> Last info to report is about __nopoll_conn_new_common function:
> My connection is a TLS one. The connection was really unreliable and
> the mentioned function use to fail 8/10 times. The SS_connect was
> reporting a SSL_ERROR_SYSCALL with errno = 0. After adding a Sleep(10)
> just before the SSL_connect fixed this. I'm not sure why but now it
> seem ok...


I have no idea why you are getting this behavior, and why you are able
to solve
it by using a Sleep (10)...it shouldn't be possible. When
SSL_ERROR_SYSCALL is 
reported is because a internal failure (handshake problem, missing
certificates,
out of memory...and similar things).


> I have one question:
> I have to implement a websocket to tcp bridge. 
> Is it possible to add a regular tcp socket hande in the main nopoll
> event loop? I would like to avoid adding an extra thread or a loop
> based on timeouts...


At this point, it is not possible. It shouldn't be difficult, but it
requires implementing
it and testing to ensure it works in a reliable way. Because you want to
implement
a bridge, I think it is best to implement your own loop so it fits
better with what you
want,

Again, thanks for reporting,
Best Regards,



> Best Regards
> Ettore 
> 
> _______________________________________________
> noPoll mailing list
> noPoll en lists.aspl.es
> http://lists.aspl.es/cgi-bin/mailman/listinfo/nopoll


-- 
Francis Brosnan Blázquez <francis en aspl.es>
ASPL
91 134 14 22 - 91 134 14 45 - 91 116 07 57

AVISO LEGAL
 
En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de
diciembre, de Protección de Datos de Carácter Personal, le informamos de
que sus datos de carácter personal, recogidos de fuentes accesibles al
público o datos que usted nos ha facilitado previamente, proceden de
bases de datos propiedad de Advanced Software Production Line, S.L.
(ASPL).
 
ASPL garantiza que los datos serán tratados con la finalidad de mantener
las oportunas relaciones comerciales o promocionales con usted o la
entidad que usted representa. No obstante, usted puede ejercitar sus
derechos de acceso, rectificación, cancelación y oposición dispuestos en
la mencionada Ley Orgánica, notificándolo por escrito a ASPL -
Protección Datos, C/Antonio Suárez 10 A-102, 28802, Alcalá de Henares
(Madrid).



------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.aspl.es/pipermail/nopoll/attachments/20150519/7e3be508/attachment.html>


Más información sobre la lista de distribución noPoll