Re: [libmicrohttpd] [PATCH]: MHD_connection_update_event_loop_info sends INTERNAL_ERROR for suspended connections

2017-03-17 Thread Evgeny Grin
On 17.03.2017 5:42, Vitaliy T wrote: > Inside of MHD_connection_handle_read () src/microhttpd/connection.c is > missing check against of the return value for the > try_grow_read_buffer() call. It's just ignored. And now without a fear > I may say that the INTERNAL_ERROR will be send for a connectio

Re: [libmicrohttpd] [PATCH]: MHD_connection_update_event_loop_info sends INTERNAL_ERROR for suspended connections

2017-03-17 Thread Evgeny Grin
On 17.03.2017 10:03, Evgeny Grin wrote: > On 17.03.2017 5:42, Vitaliy T wrote: >> As we can see the connection 127.0.0.1 port 47824 was suspended, >> resumed and then again suspended. >> >> The server was run in epoll mode with 1 thread. >> DEFAULT_HTTPD_CONNECTION_MEMORY_LIMIT = 128k >> DEFAULT_

Re: [libmicrohttpd] [PATCH]: MHD_connection_update_event_loop_info sends INTERNAL_ERROR for suspended connections

2017-03-17 Thread Vitaliy T
Hello, On 17 March 2017 at 10:03, Evgeny Grin wrote: > Please note that even if you suspend connection, you must process at > least some data (preferably - all data) and decrement value of > 'upload_data_size'. Yes, this was my mistake. Before suspending a connection I have to forgot about decre

Re: [libmicrohttpd] [PATCH]: MHD_connection_update_event_loop_info sends INTERNAL_ERROR for suspended connections

2017-03-17 Thread Evgeny Grin
On 17.03.2017 15:10, Vitaliy T wrote: > Hello, > > On 17 March 2017 at 10:03, Evgeny Grin wrote: >> Please note that even if you suspend connection, you must process at >> least some data (preferably - all data) and decrement value of >> 'upload_data_size'. > > Yes, this was my mistake. Before

Re: [libmicrohttpd] [PATCH]: MHD_connection_update_event_loop_info sends INTERNAL_ERROR for suspended connections

2017-03-17 Thread Vitaliy T
On 17 March 2017 at 15:43, Evgeny Grin wrote: > You don't need to make this check only inside callback function. If you > suspend connection and resume it later - connection conditions are not > changed, you will not get any new information in callback. So you can > store required information in y

Re: [libmicrohttpd] [PATCH]: MHD_connection_update_event_loop_info sends INTERNAL_ERROR for suspended connections

2017-03-17 Thread Evgeny Grin
On 17.03.2017 15:59, Vitaliy T wrote: > On 17 March 2017 at 15:43, Evgeny Grin wrote: >> You don't need to make this check only inside callback function. If you >> suspend connection and resume it later - connection conditions are not >> changed, you will not get any new information in callback. S

Re: [libmicrohttpd] Websockets

2017-03-17 Thread John Duncan
Websockets and RFC6455. I noticed the test_upgrade.c unit test code doesn't provide the accept handshake key combination hashing specified on page 8 of the RFC, in the section "opening handshake." Apparently we're supposed to combine the websocket key with a predesignated static GUID, hash it, an

Re: [libmicrohttpd] Websockets

2017-03-17 Thread Christian Grothoff
On 03/18/2017 01:44 AM, John Duncan wrote: > Websockets and RFC6455. I noticed the test_upgrade.c unit test code > doesn't provide the accept handshake key combination hashing specified on > page 8 of the RFC, in the section "opening handshake." > > Apparently we're supposed to combine the websoc

Re: [libmicrohttpd] Websockets

2017-03-17 Thread John Duncan
No problem. Thank you so much for your work on the library. It's great! When I write some macros to do what's required I'll follow them up with a mailing list post so others can use them if they want. Shouldn't take too long to do. ~J On Fri, Mar 17, 2017 at 2:55 PM, Christian Grothoff wrote

Re: [libmicrohttpd] Websockets

2017-03-17 Thread silvioprog
Hello John, I'm sure this example will be very useful for us! :-) Thank you! On Fri, Mar 17, 2017 at 9:59 PM, John Duncan wrote: > No problem. Thank you so much for your work on the library. It's great! > When I write some macros to do what's required I'll follow them up with a > mailing lis

Re: [libmicrohttpd] Websockets

2017-03-17 Thread John Duncan
Are you the same Silvio from the Defcon wolves among us talk? If so, you're a god. On Fri, Mar 17, 2017 at 3:05 PM, silvioprog wrote: > Hello John, > > I'm sure this example will be very useful for us! :-) > > Thank you! > > On Fri, Mar 17, 2017 at 9:59 PM, John Duncan > wrote: > >> No problem

Re: [libmicrohttpd] Websockets

2017-03-17 Thread John Duncan
Nevermind, was thinking of Silvio Cesare. He used to go by silvioprogramming back in the 90s is why I asked. Sorry for the mixup! On Fri, Mar 17, 2017 at 3:05 PM, silvioprog wrote: > Hello John, > > I'm sure this example will be very useful for us! :-) > > Thank you! > > On Fri, Mar 17, 2017 a

Re: [libmicrohttpd] Websockets

2017-03-17 Thread silvioprog
Hehe :-D :-D On Fri, Mar 17, 2017 at 11:29 PM, John Duncan wrote: > Nevermind, was thinking of Silvio Cesare. He used to go by > silvioprogramming back in the 90s is why I asked. Sorry for the mixup! > > On Fri, Mar 17, 2017 at 3:05 PM, silvioprog wrote: > >> Hello John, >> >> I'm sure this e