Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Normal
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: SERVER 5.0.0
-
Component/s: None
-
Labels:None
-
Template:customfield_10700 194239
-
Team:Systems Engineering
-
Sub-team:
-
Story Points:1
-
Sprint:Server 2017-06-14
-
Release Notes:Bug Fix
-
Release Notes Summary:
-
QA Risk Assessment:Needs Assessment
Description
In responses made to the static_file_content endpoint today, no value for the Content-Type header is defined. See this map definition. In turn, it does not appear that either Ring middleware or the underlying Jetty webserver add in a default value for the header either. For example, I see this on the wire for a request:
"GET /puppet/v3/static_file_content/modules/something/files/somefile.txt?environment=production&code_id=1234 HTTP/1.1\r\nAccept: binary\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nUser-Agent: Ruby\r\nHost: my-host:8140\r\n\r\n"
|
-> "HTTP/1.1 200 OK\r\n"
|
-> "Date: Fri, 02 Jun 2017 20:27:49 GMT\r\n"
|
-> "X-Puppet-Version: 5.0.0\r\n"
|
-> "Content-Length: 5\r\n"
|
-> "Server: Jetty(9.4.4.v20170414)\r\n"
|
-> "\r\n"
|
reading 5 bytes...
|
-> "test\n"
|
For good form, we should add a Content-Type header to the response. Since the content which is provided is translated as an input stream into raw bytes, the best Content-Type to use here is probably application/octet-stream.