Re: http server hangs on post without enctype=multipart/form-data

2008-11-26 Thread Tomas Hlavaty
Hi Alex, My suspicion is that it has something to do with Keep-Alive, and one just a thought: even if the client sends keep-alive, the server can respond close and close the connection. Is there any particular reason you do not want to close the connection after you served the request? Would

Re: http server hangs on post without enctype=multipart/form-data

2008-11-26 Thread Tomas Hlavaty
Hi Alex, Sometimes POST seems to lose data, or contain data out of context. No idea yet, but I observe this once every few weeks, and I'm tracing the activities now. I haven't noticed this yet but I'll let you know if I do;-) Cheers, Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: http server hangs on post without enctype=multipart/form-data

2008-11-26 Thread Alexander Burger
Hi Tomas, it works for me now with ht:Read. Fine! :-) Would it be possible to put comment into CHANGES file? Usually I mention there only kernel changes (though until 2006 I regarded some GUI parts also as belonging to the kernel). At the moment I'm still searching for a Heisenbug,

Re: http server hangs on post without enctype=multipart/form-data

2008-11-26 Thread Tomas Hlavaty
Hi Alex, it works for me now with ht:Read. Would it be possible to put comment into CHANGES file? Do you use any version control system? Thanks, Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Alexander Burger
On Sun, Nov 23, 2008 at 10:29:35AM +, Tomas Hlavaty wrote: What about using 'peek' on the last char? Yes, this might do. A C function 'char1' might be fastest fix probably. Or 'ht:Read' in src/ht.c, usable as: (ht:Read *ContLen) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Tomas Hlavaty
I was thinking about rewriting the server, I already wrote a prototype asynchronous http server but I have only the reading part non-blocking and not the writing part yet. I do not want to spend too much time on it right now. Sorry, I was not clear. It would not have to be a asynhronous

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Tomas Hlavaty
An even better solution might be to extend the built-in 'line' function in that a way that when only a single 'cnt' argument is passed it is taken as a length parameter. The idea is that in the current semantics of 'line' a single 'cnt' argument makes no sense. But would cnt mean number of

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Alexander Burger
On Sun, Nov 23, 2008 at 01:16:55PM +0100, Alexander Burger wrote: Let me investigate a solution like (ht:Read *ContLen), returning a single-char-line for a given number of bytes. OK, I've built this now. The 'ht' library has a new function 'Read'. I had also to change lib/form.js (remove the

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Alexander Burger
Hi Tomas, you to get http query vars in assoc list (see *HtVars and *HtVarsHook). Sometimes it is possible to make application-specific changes or extensions dynamically at application startup, without the need to modify the system files. For example, your extension of '_htSet' (de _htSet

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Tomas Hlavaty
Hi Alex, thanks for fixing it. Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Tomas Hlavaty
Hi Alex, (redef _htSet @ (if (and *HtVarsHook (*HtVarsHook)) (push '*HtVars (cons (pack (next)) (next))) (pass _htSet) ) ) thank you, I will use this;-) Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Alexander Burger
Henrik + Tomas, many thanks for pointing out this bug! I feel much better now :-) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Alexander Burger
Hi Tomas, I would expect 'char' to block and return next character when available and 'peek' return the next character if available otherwise return nothing without blocking. On that level there is no concept of blocking. Data are read as a logical stream. Something similar to what you