Fix vif on firefox
This commit is contained in:
parent
c4cb5d19f3
commit
95ebaee99a
2 changed files with 5 additions and 2 deletions
|
@ -75,7 +75,7 @@ let default req target server _cfg =
|
||||||
| None ->
|
| None ->
|
||||||
let field = "content-type" in
|
let field = "content-type" in
|
||||||
let* () = Response.add ~field "text/plain; charset=utf-8" in
|
let* () = Response.add ~field "text/plain; charset=utf-8" in
|
||||||
let* () = Response.with_string req "Unauthorized place" in
|
let* () = Response.with_string req "Unauthorized place\n" in
|
||||||
Response.respond `Unauthorized
|
Response.respond `Unauthorized
|
||||||
| Some { username } ->
|
| Some { username } ->
|
||||||
let field = "content-type" in
|
let field = "content-type" in
|
||||||
|
|
|
@ -161,7 +161,10 @@ let run : type a p q. Vif_request0.t -> p state -> (p, q, a) t -> q state * a =
|
||||||
headers := (k, v) :: Vif_headers.rem !headers k;
|
headers := (k, v) :: Vif_headers.rem !headers k;
|
||||||
(state, ())
|
(state, ())
|
||||||
| Empty, Stream stream -> (Filled stream, ())
|
| Empty, Stream stream -> (Filled stream, ())
|
||||||
| Empty, String str -> (Filled (Stream.Stream.singleton str), ())
|
| Empty, String str ->
|
||||||
|
if Vif_request0.version req = 1
|
||||||
|
then headers := Vif_headers.add_unless_exists !headers "connection" "close";
|
||||||
|
(Filled (Stream.Stream.singleton str), ())
|
||||||
| Filled stream, Respond status ->
|
| Filled stream, Respond status ->
|
||||||
let headers = !headers in
|
let headers = !headers in
|
||||||
let headers, stream =
|
let headers, stream =
|
||||||
|
|
Loading…
Reference in a new issue