After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747816 - Add ServerName header when responding to HTTP Requests
Add ServerName header when responding to HTTP Requests
Product: rygel
Classification: Applications
Component: librygel-server
git master
Other Windows
: Normal normal
: ---
Assigned To: rygel-maint
Depends on:
Reported: 2015-04-14 05:00 UTC by Parthiban Balasubramanian
Modified: 2016-02-13 23:06 UTC
See Also:
GNOME target: ---
GNOME version: ---

Add Server header in HTTP response (1.68 KB, patch)
2015-04-14 05:00 UTC, Parthiban Balasubramanian
none Details | Review
server: Add "Sever:" header (2.66 KB, patch)
2016-02-13 23:05 UTC, Jens Georg
committed Details | Review

Description Parthiban Balasubramanian 2015-04-14 05:00:42 UTC
Created attachment 301503 [details] [review]
Add Server header in HTTP response

This is an enhancement patch to add "Server" header when responding to HTTP
 requests. This has been helpful when performing debugging in the network more easily when more than one Rygel instances are connected to the same network.
Comment 1 Jens Georg 2015-04-14 07:41:41 UTC
Review of attachment 301503 [details] [review]:

::: src/librygel-server/rygel-http-get.vala
@@ +208,3 @@
+        this.msg.response_headers.append ("Server",
+                MetaConfig.get_default ().get_string ("general", "servername"));

This will throw an error unneccessarily for all those people that run rygel with an old config
Comment 2 Parthiban Balasubramanian 2015-04-15 03:28:47 UTC
Do you prefer it to be placed in Rygel.UserConfig with its own getter?
Comment 3 Jens Georg 2015-04-15 07:45:10 UTC
No, get_string will throw an error if it's not found.

Either set a default in the catch() or not set it at all as it is currently.

Taking a (very) quick look at the DLNA spec, there doesn't seem to be a mention of the Server header outside of the CVP stuff, so I'd opt for nothing as it is currently or the UPnP server header "OS/Version UPnP/1.0 Rygel/Version"?
Comment 4 Parthiban Balasubramanian 2015-05-04 14:23:50 UTC
Yes, I see your point. Pardon my ignorance, is there an api that is currently being used to get the OS version and Rygel version. 
I dont want to a different mechanism to get these values if there is one already available and working.
Comment 5 Jens Georg 2015-05-09 18:35:23 UTC
Rygel version is available through BuildConfig.PACKAGE_VERSION.

Wonder which format to use though, the DLNA spec says

Rygel/version DLNADOC/1.5x UPnP/1.0
Comment 6 Jens Georg 2016-02-13 23:05:48 UTC
Created attachment 321088 [details] [review]
server: Add "Sever:" header

We append a Server header to the HTTP response.

Default is plugin/version g_get_prgname()/version DLNA/1.51 UPnP/1.0

It is configurable on a per-plugin base using the key "server-name"

Signed-off-by: Jens Georg <>
Comment 7 Jens Georg 2016-02-13 23:06:06 UTC
Attachment 321088 [details] pushed as d78337c - server: Add "Sever:" header