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 649965 - SoupCache: store the HTTP status code in the cache (and use it)
SoupCache: store the HTTP status code in the cache (and use it)
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on: 652554
Blocks:
 
 
Reported: 2011-05-11 13:43 UTC by Sergio Villar
Modified: 2011-06-16 15:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Keep track of the HTTP status code (3.79 KB, patch)
2011-05-11 13:45 UTC, Sergio Villar
accepted-commit_now Details | Review
Set status code and headers in SoupMessage when generating replies (3.61 KB, patch)
2011-05-11 13:48 UTC, Sergio Villar
accepted-commit_now Details | Review

Description Sergio Villar 2011-05-11 13:43:11 UTC
The cache should use the same HTTP status code returned by the server when generating replies.
Comment 1 Sergio Villar 2011-05-11 13:45:17 UTC
Created attachment 187629 [details] [review]
Keep track of the HTTP status code

Store and use the HTTP code for cache replies.
Comment 2 Sergio Villar 2011-05-11 13:48:29 UTC
Created attachment 187630 [details] [review]
Set status code and headers in SoupMessage when generating replies

The cache was not correctly setting neither the status code nor the response headers in the SoupMessage used to reply a request when a revalidation was needed. On the contrary we were incorrectly setting the headers in the SoupMessage used to revalidate the resource.
Comment 3 Sergio Villar 2011-05-11 13:49:35 UTC
Adding a dependency as one of the patches changes the GVariant format used by the cache.
Comment 4 Dan Winship 2011-05-16 08:55:45 UTC
Comment on attachment 187629 [details] [review]
Keep track of the HTTP status code

ok as is, but should we store the reason_phrase and http_version too?
Comment 5 Dan Winship 2011-06-07 20:48:33 UTC
Comment on attachment 187630 [details] [review]
Set status code and headers in SoupMessage when generating replies

oops, forgot to review this one before. looks good
Comment 6 Sergio Villar 2011-06-16 15:24:03 UTC
Committed 84486ca56799d50fea090cda96622444a2722a9b