Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions server/core/resources.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ define open generic respond-to-connect (resource :: <abstract-resource>, #key, #
//
define open generic default-content-type
(resource :: <abstract-resource>)
=> (content-type :: type-union(<mime-type>, <string>));

=> (content-type :: <byte-string>);
define method default-content-type
(resource :: <abstract-resource>)
=> (content-type :: <string>)
=> (content-type :: <byte-string>)
"application/octet-stream"
end;

Expand Down
3 changes: 2 additions & 1 deletion server/core/static-files.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ define method locator-media-type
if (mtype)
mtype
else
let mtype :: <mime-type> = default-content-type(resource);
let mtype :: <mime-type>
= string-to-mime-type(default-content-type(resource));
make(<media-type>,
type: mtype.mime-type,
subtype: mtype.mime-subtype)
Expand Down
3 changes: 2 additions & 1 deletion server/dsp/dsp.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ define method make
end;

define method default-content-type
(resource :: <dylan-server-page>) => (content-type :: <string>)
(resource :: <dylan-server-page)
=> (content-type :: <byte-string>)
"text/html"
end;

Expand Down