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 702555 - 7.2.5.6,7.4.23.3: Always use HTTP 1.1, even if the peer requests HTTP 1.0
7.2.5.6,7.4.23.3: Always use HTTP 1.1, even if the peer requests HTTP 1.0
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: general
git master
Other Linux
: Low minor
: ---
Assigned To: rygel-maint
rygel-maint
ivi
Depends on:
Blocks:
 
 
Reported: 2013-06-18 12:50 UTC by Jens Georg
Modified: 2014-06-14 15:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Force HTTP version 1.1 on SOAP requests (919 bytes, patch)
2013-06-19 09:25 UTC, Jens Georg
none Details | Review
server: Force HTTP version to 1.1 (1.01 KB, patch)
2013-06-19 09:31 UTC, Jens Georg
none Details | Review
Force HTTP version 1.1 on SOAP requests (1.09 KB, patch)
2013-06-19 11:05 UTC, Jens Georg
committed Details | Review
server: Force HTTP version to 1.1 (1.08 KB, patch)
2013-06-19 11:09 UTC, Jens Georg
committed Details | Review
Alternate way to set the HTTP response version to 1.1 for 1.0 requests (1.50 KB, patch)
2014-02-18 03:19 UTC, Craig Pratt
committed Details | Review

Description Jens Georg 2013-06-18 12:50:45 UTC
I think it's a libsoup default to mirror the version of the peer.
Comment 1 Jens Georg 2013-06-19 09:25:20 UTC
Created attachment 247242 [details] [review]
Force HTTP version 1.1 on SOAP requests

This is for 7.2.5.6 - not sure wether we really should do this, though.
Although soup uses 1.1 by default anyway.
Comment 2 Jens Georg 2013-06-19 09:31:24 UTC
Created attachment 247243 [details] [review]
server: Force HTTP version to 1.1
Comment 3 Jens Georg 2013-06-19 10:54:03 UTC
This patch seems to break 7.2.5.5 and 7.2.6.1,2
Comment 4 Jens Georg 2013-06-19 10:55:02 UTC
Ah, because HTTP 1.1 doesn't have connection: close as default :-/
Comment 5 Jens Georg 2013-06-19 11:05:13 UTC
Created attachment 247251 [details] [review]
Force HTTP version 1.1 on SOAP requests

Second version, close connection as HTTP 1.0 would.
Comment 6 Jens Georg 2013-06-19 11:09:22 UTC
Created attachment 247252 [details] [review]
server: Force HTTP version to 1.1
Comment 7 Jens Georg 2013-07-30 07:22:09 UTC
Comment on attachment 247251 [details] [review]
Force HTTP version 1.1 on SOAP requests

Attachment 247251 [details] pushed as 27e2dbe - Force HTTP version 1.1 on SOAP requests
Comment 8 Jens Georg 2013-07-30 08:20:04 UTC
Attachment 247252 [details] pushed as ed6b267 - server: Force HTTP version to 1.1
Comment 9 Craig Pratt 2014-02-06 09:20:30 UTC
Review of attachment 247252 [details] [review]:

::: src/librygel-server/rygel-http-request.vala
@@ +59,3 @@
+            msg.response_headers.append ("Connection", "close");
+        }
+

I think the way this is done should be revisited. 

While DLNA requires a server to respond as being 1.1 to a 1.0 request, it's still required to formulate the response with 1.0 headers. But this block prevents downstream logic (e.g. HTTPGet) from being able to add version-sensitive logic (the fact that it's a 1.0 request is lost). 

I'm thinking the set_http_version() could be called just before the message response is sent. I'll try to come up with a specific recommendation...
Comment 10 Jens Georg 2014-02-06 09:43:33 UTC
Is this causing any problems? Should we reopen the bug?
Comment 11 Craig Pratt 2014-02-18 03:04:32 UTC
Sorry - missed your (quick) reply. And been at DLNA Plugfest.

The issue is that if you need to formulate the response according to the HTTP version of the client request (e.g. DLNA 7.5.4.3.2.34/.35 mandates different caching response headers based on the HTTP version), I don't see a way to tell the difference in the Soup message once "set_http_version (Soup.HTTPVersion.@1_1)" is called (Soup doesn't seem to have separate request & response "http_version" properties). And this call is made when the HTTPRequest object is constructed (and before and of the HTTPGet/HTTPGetHandler logic runs).

Attaching an possible alternative.
Comment 12 Craig Pratt 2014-02-18 03:19:42 UTC
Created attachment 269501 [details] [review]
Alternate way to set the HTTP response version to 1.1 for 1.0 requests

This patch causes "set_http_version (Soup.HTTPVersion.@1_1)" to be called near the end of HTTPGet.handle_item_request instead of in the HTTPRequest constructor.
Comment 13 Jens Georg 2014-02-18 09:41:49 UTC
Ah ok. so this was set too early.
Comment 14 Craig Pratt 2014-02-18 18:52:04 UTC
Yeah - too early.

Of course the code with the HTTP 1.0 isn't in master. But I'll update the patch on bug 720223 with the dependant code (that implements 7.5.4.3.2.34/.35 and passes the new CTT tests) shortly.
Comment 15 Craig Pratt 2014-02-18 18:53:05 UTC
(^ with the HTTP 1.0 *check*... ^)