src/Tools/WWW_Find/http_util.ML
changeset 41491 a2ad5b824051
parent 33823 24090eae50b6
child 43278 1fbdcebb364b
equal deleted inserted replaced
41490:0f1e411a1448 41491:a2ad5b824051
    19 
    19 
    20 fun make_header_field (name, value) = concat [name, ": ", value, crlf];
    20 fun make_header_field (name, value) = concat [name, ": ", value, crlf];
    21 
    21 
    22 fun reply_header (status, content_type, extra_fields) =
    22 fun reply_header (status, content_type, extra_fields) =
    23   let
    23   let
    24     val code = (Int.toString o HttpStatus.to_status_code) status;
    24     val code = (string_of_int o HttpStatus.to_status_code) status;
    25     val reason = HttpStatus.to_reason status;
    25     val reason = HttpStatus.to_reason status;
    26     val show_content_type = pair "Content-Type" o Mime.show_type;
    26     val show_content_type = pair "Content-Type" o Mime.show_type;
    27   in
    27   in
    28   concat
    28   concat
    29     (map make_header_field
    29     (map make_header_field