Skip to content

Commit

Permalink
Merge pull request #489 from cloudfoundry/compressionDebug
Browse files Browse the repository at this point in the history
Compression debug
  • Loading branch information
kevin-ortega authored Jan 12, 2021
2 parents ce86063 + d525a49 commit 9ac73d7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/liberty_buildpack/container/liberty.rb
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ def get_context_root

def update_http_endpoint(server_xml_doc)
endpoints = REXML::XPath.match(server_xml_doc, '/server/httpEndpoint')

if endpoints.empty?
endpoint = REXML::Element.new('httpEndpoint', server_xml_doc.root)
endpoint.add_attribute('id', 'defaultHttpEndpoint')
Expand All @@ -474,7 +473,11 @@ def update_http_endpoint(server_xml_doc)
endpoint.add_attribute('host', '*')
end
endpoint.add_attribute('httpPort', "${#{KEY_HTTP_PORT}}")
endpoint.add_element('compression') if endpoint.elements['compression'].nil?

compression = REXML::XPath.match(server_xml_doc, '/server/compression')
if compression.empty?
endpoint.add_element('compression') if endpoint.elements['compression'].nil?
end
endpoint.delete_attribute('httpsPort')
end

Expand Down

0 comments on commit 9ac73d7

Please sign in to comment.