Commits

Anonymous committed 9a61924

.

  • Participants
  • Parent commits c8e42b4

Comments (0)

Files changed (2)

File src/amall_http.ml

 value get_basic_auth
  : rq_headers -> option (string * string)  (* Some (user, password) *)
  = fun h ->
-     match List.Assoc.get_opt ~keq:String.eq "Authorization" h.rq_all with
+     match List.Assoc.get_opt ~keq:String.eq_nocase_latin1
+       "Authorization" h.rq_all with
      [ None -> None
      | Some hval ->
          match String.split is_whitespace hval with

File src/amall_http_server.ml

 
 module Ws = Websocket.Server(IO)(I);
 
+value rec string_of_exn e =
+  match e with
+  [ I.Iteratees_err_msg e -> "it/" ^ string_of_exn e
+  | Ws.Ws_service_error e -> "wssrv/" ^ string_of_exn e
+  | _ -> Printexc.to_string e
+  ]
+;
+
 value do_websocket
   (outsock : Ws.ws_out_socket)
   (ws_worker : Ws.websocket_service_func_worker_gen unit)
 
 value hsdbg fmt = Printf.ksprintf (amdbg "hs: %s") fmt;
 
-value rec string_of_exn e =
-  match e with
-  [ I.Iteratees_err_msg e -> "it/" ^ string_of_exn e
-  | Ws.Ws_service_error e -> "wssrv/" ^ string_of_exn e
-  | _ -> Printexc.to_string e
-  ]
-;
-
 value io_unit = IO.return ()
 ;