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 741108 - Unnecessary conditional requests after a resource has been revalidated
Unnecessary conditional requests after a resource has been revalidated
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: HTTP Transport
2.49.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2014-12-04 11:54 UTC by Carlos Garcia Campos
Modified: 2014-12-05 08:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cache: Do not add Age header to all responses (2.39 KB, patch)
2014-12-04 11:55 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2014-12-04 11:54:02 UTC
The problem is that soup_cache_send_response() is always adding an Age header to the response, causing the resource to be considered expired when it's requested again.
Comment 1 Carlos Garcia Campos 2014-12-04 11:55:27 UTC
Created attachment 292123 [details] [review]
cache: Do not add Age header to all responses

Commit message explains the reasoning
Comment 2 Sergio Villar 2014-12-04 14:57:25 UTC
As I told Carlos on IRC I think he's right and that I got mislead when I read the spec. The first sentence seems to imply that any request served by the cache must carry that Header. The fact is that as soon as we need to issue a conditional request the cached resource becomes "first hand" as if it was served by the remote host even though the actual data comes from the cache.

Summarizing it's a lgtm.
Comment 3 Dan Winship 2014-12-04 15:14:44 UTC
Comment on attachment 292123 [details] [review]
cache: Do not add Age header to all responses

>approach that is comptaible with other browsers and RFC compliant is to

typo "comptaible"

otherwise, lgtm
Comment 4 Carlos Garcia Campos 2014-12-05 08:13:32 UTC
Comment on attachment 292123 [details] [review]
cache: Do not add Age header to all responses

Pushed to git master