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
2 changes: 1 addition & 1 deletion .jenkins.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

opam pin add --no-action tyxml 'https://github.com/ocsigen/tyxml.git#master'
opam pin add --no-action ocsigenserver .
opam install camlzip
opam install --deps-only ocsigenserver
Expand Down
2 changes: 1 addition & 1 deletion opam
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ depends: [
"ocamlnet" {>= "3.6.0"}
"pcre-ocaml"
"cryptokit"
"tyxml" {>= "3.1.0"}
"tyxml" {>= "dev"}
("dbm" | "sqlite3-ocaml")
"ipaddr" {>= "2.1"}
]
Expand Down
8 changes: 5 additions & 3 deletions src/http/ocsigen_senders.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ open Ocsigen_stream


(*****************************************************************************)
(** this module instantiate the HTTP_CONTENT signature for an Xhtml content*)
(** this module instantiate the HTTP_CONTENT signature for an Html content*)

module Make_XML_Content(Xml : Xml_sigs.Iterable)
(Typed_xml : Xml_sigs.Typed_xml with module Xml := Xml)
= struct

module Xhtmlprinter =
module Htmlprinter =
Xml_print.Make_typed(Xml)(Typed_xml)(Ocsigen_stream.StringStream)

type t = Typed_xml.doc
Expand Down Expand Up @@ -64,13 +64,15 @@ module Make_XML_Content(Xml : Xml_sigs.Iterable)
choose_content_type options
Typed_xml.Info.alternative_content_types
Typed_xml.Info.content_type in
let x = Xhtmlprinter.print ~advert c in
let encode x = fst (Xml_print.Utf8.normalize_html x) in
let x = Htmlprinter.print ~encode ~advert c in
let default_result = Result.default () in
Lwt.return
(Result.update default_result
~content_length:None
~content_type:(Some content_type)
~etag:(get_etag c)
~charset:(Some "utf-8")
~headers:Http_headers.dyn_headers
~stream:(x, None) ())
end
Expand Down