diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-02-23 15:44:25 -0500 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-02-23 15:44:25 -0500 |
commit | 36249ebd4dece7ee69cd85e7e169db0dc4315e3e (patch) | |
tree | 89b8cdcc7cc57963acac1429f6007b63ca93a595 /protocol.f90 | |
parent | 6a0d3367e0b314d6c947950f7c3193be3d9d1465 (diff) | |
download | LR-87-36249ebd4dece7ee69cd85e7e169db0dc4315e3e.tar.gz LR-87-36249ebd4dece7ee69cd85e7e169db0dc4315e3e.zip |
Added favicon support. Fixed UTF-8 display on dumb renderer.
Diffstat (limited to 'protocol.f90')
-rw-r--r-- | protocol.f90 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/protocol.f90 b/protocol.f90 index 613ca9f..d06d901 100644 --- a/protocol.f90 +++ b/protocol.f90 @@ -114,7 +114,7 @@ contains character(*), intent(inout)::url integer, intent(in)::unit_number character(*), intent(out)::return_type - class(binary_handler)::bh + class(binary_handler), optional::bh character(*), intent(in), optional::server_name integer::port @@ -144,6 +144,7 @@ contains server = server_name port = gemini_default_port else + allocate(character(len=len_trim(url)) :: server) call get_server_from_url(url, server, port) if(port < 0) then port = gemini_default_port @@ -185,8 +186,12 @@ contains call get_mimetype(response_line, return_type) binary_file = is_binary_file(return_type) - if(binary_file) then - binary_unit = bh%handle_binary(return_type, trim(url), binary_status) + if(binary_file ) then + if(present(bh)) then + binary_unit = bh%handle_binary(return_type, trim(url), binary_status) + else + binary_status = binary_ignore + end if end if else |