2009/12/18 Davide Marquês <nesrait@gmail.com>
I just looked at the code and I suggest this:
case yaws:outh_get_doclose() of
  true -> ok;
  false ->
    if

     GS#gs.ssl == nossl ->
      gen_tcp:close(Client);
    GS#gs.ssl == ssl ->
      ssl:close(Client)
    end
end

Along with:
  put(outh, (get(outh))#outh{doclose = false})
instead of
  put(websocket,true)

That should make it generic enough for usage in streaming pids.

In that case, you could just return

{header, {connection, erase}}

in the same list where you return streamcontent_from_pid, which removes any Connection header from the reply headers and also sets doclose in the process registry to false.

--steve