[plt-scheme] Buffering problems with web-server and HTTP/1.1

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Sun May 22 10:51:39 EDT 2005

This has just recently been fixed. The PR was 7383. 

http://bugs.plt-scheme.org/query/?cmd=view&pr=7383

The way it was fixed was to add your call inside get-ports.

Jay

On 5/21/05, Edmund Dengler <edmundd at esentire.com> wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> Greetings!
> 
> Using the current CVS tree, I am having problems with the web server
> buffering output under HTTP/1.1 requests, so a browser does not get a
> response.
> 
> I found a fast fix by specifying no buffering on the output port within
> <web-server-unit.ss>:
> 
>       (define (server-loop get-ports)
>         (let loop ()
>           (let ([connection-cust (make-custodian)])
>             (parameterize ([current-custodian connection-cust])
>               (let-values ([(ip op) (get-ports)])
>                 (file-stream-buffer-mode op 'none) ;; FIX
>                 (thread
>                  (lambda ()
>                    (serve-connection
>                     (new-connection config:initial-connection-timeout
>                                     ip op (current-custodian) #f))))))
>             (loop))))
> 
> (Note: This problem does not occur under 299.100)
> 
> Can anyone let me know if this is a resonable fix, or if there is a better
> spot?
> 
> Regards!
> Ed
> 
> 


-- 
Jay McCarthy <jay.mccarthy at gmail.com>
http://jay.makeoutcity.com/



Posted on the users mailing list.