Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/b78e887ba097decb2fc774ab70f2bd8a671f9928
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/b78e887ba097decb2fc774ab70f2bd8a671f9928
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/b78e887ba097decb2fc774ab70f2bd8a671f9928

The branch, master has been updated
       via  b78e887ba097decb2fc774ab70f2bd8a671f9928 (commit)
       via  bd4377d693a8082168c618ad1da172daebcd1662 (commit)
       via  e582497322428f72343115f055e9e198047fe3b4 (commit)
      from  c830d14d0bd06dda4eaf7de27ae97b826173afe1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=b78e887ba097decb2fc774ab70f2bd8a671f9928
commit b78e887ba097decb2fc774ab70f2bd8a671f9928
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    Add documentation on the cookie version field

diff --git a/include/netsurf/cookie_db.h b/include/netsurf/cookie_db.h
index 54d0145..a5cd489 100644
--- a/include/netsurf/cookie_db.h
+++ b/include/netsurf/cookie_db.h
@@ -27,6 +27,14 @@
 #include <stdbool.h>
 #include <time.h>
 
+/**
+ * Version of cookie
+ *
+ * RFC2109 and RFC2965 "HTTP State Management Mechanism" defined
+ * alternative versions of cookies. Nothing used them and these RFC
+ * are now obsoleted by RFC6265 which completely removes the
+ * alternative versions.
+ */
 enum cookie_version {
        COOKIE_NETSCAPE = 0,
        COOKIE_RFC2109 = 1,


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=bd4377d693a8082168c618ad1da172daebcd1662
commit bd4377d693a8082168c618ad1da172daebcd1662
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    remove cookie manage display of the no_delete boolean
    
    The no_delete flag is mislabelled as persistent. In fact it is simply
    never altered from its default value. It is serialised and its state
    kept on disc but otherwise is completely vestigial.

diff --git a/desktop/cookie_manager.c b/desktop/cookie_manager.c
index d3d5a7d..6134fa5 100644
--- a/desktop/cookie_manager.c
+++ b/desktop/cookie_manager.c
@@ -52,7 +52,6 @@ enum cookie_manager_field {
        COOKIE_M_LAST_USED,
        COOKIE_M_RESTRICTIONS,
        COOKIE_M_VERSION,
-       COOKIE_M_PERSISTENT,
        COOKIE_M_DOMAIN_FOLDER,
        COOKIE_M_N_FIELDS
 };
@@ -333,13 +332,6 @@ cookie_manager_set_treeview_field_data(struct 
cookie_manager_entry *e,
                break;
        }
 
-       /* Set the Persistent text */
-       if (data->no_destroy) {
-               e->data[COOKIE_M_PERSISTENT] = cm_ctx.values[COOKIE_M_YES];
-       } else {
-               e->data[COOKIE_M_PERSISTENT] = cm_ctx.values[COOKIE_M_NO];
-       }
-
        return NSERROR_OK;
 }
 
@@ -638,15 +630,6 @@ static nserror cookie_manager_init_entry_fields(void)
                goto error;
        }
 
-       cm_ctx.fields[COOKIE_M_PERSISTENT].flags = TREE_FLAG_SHOW_NAME;
-       label = "TreeviewLabelPersistent";
-       label = messages_get(label);
-       if (lwc_intern_string(label, strlen(label),
-                       &cm_ctx.fields[COOKIE_M_PERSISTENT].field) !=
-                       lwc_error_ok) {
-               goto error;
-       }
-
        cm_ctx.fields[COOKIE_M_DOMAIN_FOLDER].flags = TREE_FLAG_DEFAULT;
        label = "TreeviewLabelDomainFolder";
        label = messages_get(label);
@@ -710,15 +693,6 @@ static nserror cookie_manager_init_common_values(void)
        cookie_manager_field_builder(COOKIE_M_VERSION,
                        &cm_ctx.values[COOKIE_M_RFC2965], strdup(temp));
 
-       /* Set the Persistent value text */
-       temp = messages_get("Yes");
-       cookie_manager_field_builder(COOKIE_M_PERSISTENT,
-                       &cm_ctx.values[COOKIE_M_YES], strdup(temp));
-
-       temp = messages_get("No");
-       cookie_manager_field_builder(COOKIE_M_PERSISTENT,
-                       &cm_ctx.values[COOKIE_M_NO], strdup(temp));
-
        return NSERROR_OK;
 }
 


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=e582497322428f72343115f055e9e198047fe3b4
commit e582497322428f72343115f055e9e198047fe3b4
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    if the cookie is a session cookie indicate it
    
    previously session cookies were simply displayed as having an expiry
    in 1970 which was unhelpful.

diff --git a/content/urldb.c b/content/urldb.c
index b27e23c..4888afc 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -112,6 +112,12 @@
 #include "content/content.h"
 #include "content/urldb.h"
 
+/**
+ * cookie entry.
+ *
+ * \warn This *must* be kept in sync with the public interface in
+ *   netsurf/cookie_db.h
+ */
 struct cookie_internal_data {
        struct cookie_internal_data *prev;      /**< Previous in list */
        struct cookie_internal_data *next;      /**< Next in list */
diff --git a/desktop/cookie_manager.c b/desktop/cookie_manager.c
index 3f48dad..d3d5a7d 100644
--- a/desktop/cookie_manager.c
+++ b/desktop/cookie_manager.c
@@ -294,8 +294,14 @@ cookie_manager_set_treeview_field_data(struct 
cookie_manager_entry *e,
                        &e->data[COOKIE_M_PATH], strdup(data->path));
 
        /* Set the Expires date field */
-       cookie_manager_field_builder_time(COOKIE_M_EXPIRES,
+       if (data->expires == -1) {
+               cookie_manager_field_builder(COOKIE_M_EXPIRES,
+                       &e->data[COOKIE_M_EXPIRES],
+                       strdup(messages_get("CookieManagerSession")));
+       } else {
+               cookie_manager_field_builder_time(COOKIE_M_EXPIRES,
                        &e->data[COOKIE_M_EXPIRES], &data->expires);
+       }
 
        /* Set the Last used date field */
        cookie_manager_field_builder_time(COOKIE_M_LAST_USED,
diff --git a/resources/FatMessages b/resources/FatMessages
index 7e08038..9fb5939 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -1273,6 +1273,7 @@ nl.all.TreeviewLabelFolder:Map:
 
 # Cookie Manager field values
 #
+en.all.CookieManagerSession:Session
 en.all.CookieManagerHTTPS:Secure hosts via https only
 de.all.CookieManagerHTTPS:Secure hosts via https only
 fr.all.CookieManagerHTTPS:Hôtes sécurisés via https uniquement


-----------------------------------------------------------------------

Summary of changes:
 content/urldb.c             |    6 ++++++
 desktop/cookie_manager.c    |   34 +++++++---------------------------
 include/netsurf/cookie_db.h |    8 ++++++++
 resources/FatMessages       |    1 +
 4 files changed, 22 insertions(+), 27 deletions(-)

diff --git a/content/urldb.c b/content/urldb.c
index b27e23c..4888afc 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -112,6 +112,12 @@
 #include "content/content.h"
 #include "content/urldb.h"
 
+/**
+ * cookie entry.
+ *
+ * \warn This *must* be kept in sync with the public interface in
+ *   netsurf/cookie_db.h
+ */
 struct cookie_internal_data {
        struct cookie_internal_data *prev;      /**< Previous in list */
        struct cookie_internal_data *next;      /**< Next in list */
diff --git a/desktop/cookie_manager.c b/desktop/cookie_manager.c
index 3f48dad..6134fa5 100644
--- a/desktop/cookie_manager.c
+++ b/desktop/cookie_manager.c
@@ -52,7 +52,6 @@ enum cookie_manager_field {
        COOKIE_M_LAST_USED,
        COOKIE_M_RESTRICTIONS,
        COOKIE_M_VERSION,
-       COOKIE_M_PERSISTENT,
        COOKIE_M_DOMAIN_FOLDER,
        COOKIE_M_N_FIELDS
 };
@@ -294,8 +293,14 @@ cookie_manager_set_treeview_field_data(struct 
cookie_manager_entry *e,
                        &e->data[COOKIE_M_PATH], strdup(data->path));
 
        /* Set the Expires date field */
-       cookie_manager_field_builder_time(COOKIE_M_EXPIRES,
+       if (data->expires == -1) {
+               cookie_manager_field_builder(COOKIE_M_EXPIRES,
+                       &e->data[COOKIE_M_EXPIRES],
+                       strdup(messages_get("CookieManagerSession")));
+       } else {
+               cookie_manager_field_builder_time(COOKIE_M_EXPIRES,
                        &e->data[COOKIE_M_EXPIRES], &data->expires);
+       }
 
        /* Set the Last used date field */
        cookie_manager_field_builder_time(COOKIE_M_LAST_USED,
@@ -327,13 +332,6 @@ cookie_manager_set_treeview_field_data(struct 
cookie_manager_entry *e,
                break;
        }
 
-       /* Set the Persistent text */
-       if (data->no_destroy) {
-               e->data[COOKIE_M_PERSISTENT] = cm_ctx.values[COOKIE_M_YES];
-       } else {
-               e->data[COOKIE_M_PERSISTENT] = cm_ctx.values[COOKIE_M_NO];
-       }
-
        return NSERROR_OK;
 }
 
@@ -632,15 +630,6 @@ static nserror cookie_manager_init_entry_fields(void)
                goto error;
        }
 
-       cm_ctx.fields[COOKIE_M_PERSISTENT].flags = TREE_FLAG_SHOW_NAME;
-       label = "TreeviewLabelPersistent";
-       label = messages_get(label);
-       if (lwc_intern_string(label, strlen(label),
-                       &cm_ctx.fields[COOKIE_M_PERSISTENT].field) !=
-                       lwc_error_ok) {
-               goto error;
-       }
-
        cm_ctx.fields[COOKIE_M_DOMAIN_FOLDER].flags = TREE_FLAG_DEFAULT;
        label = "TreeviewLabelDomainFolder";
        label = messages_get(label);
@@ -704,15 +693,6 @@ static nserror cookie_manager_init_common_values(void)
        cookie_manager_field_builder(COOKIE_M_VERSION,
                        &cm_ctx.values[COOKIE_M_RFC2965], strdup(temp));
 
-       /* Set the Persistent value text */
-       temp = messages_get("Yes");
-       cookie_manager_field_builder(COOKIE_M_PERSISTENT,
-                       &cm_ctx.values[COOKIE_M_YES], strdup(temp));
-
-       temp = messages_get("No");
-       cookie_manager_field_builder(COOKIE_M_PERSISTENT,
-                       &cm_ctx.values[COOKIE_M_NO], strdup(temp));
-
        return NSERROR_OK;
 }
 
diff --git a/include/netsurf/cookie_db.h b/include/netsurf/cookie_db.h
index 54d0145..a5cd489 100644
--- a/include/netsurf/cookie_db.h
+++ b/include/netsurf/cookie_db.h
@@ -27,6 +27,14 @@
 #include <stdbool.h>
 #include <time.h>
 
+/**
+ * Version of cookie
+ *
+ * RFC2109 and RFC2965 "HTTP State Management Mechanism" defined
+ * alternative versions of cookies. Nothing used them and these RFC
+ * are now obsoleted by RFC6265 which completely removes the
+ * alternative versions.
+ */
 enum cookie_version {
        COOKIE_NETSCAPE = 0,
        COOKIE_RFC2109 = 1,
diff --git a/resources/FatMessages b/resources/FatMessages
index 7e08038..9fb5939 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -1273,6 +1273,7 @@ nl.all.TreeviewLabelFolder:Map:
 
 # Cookie Manager field values
 #
+en.all.CookieManagerSession:Session
 en.all.CookieManagerHTTPS:Secure hosts via https only
 de.all.CookieManagerHTTPS:Secure hosts via https only
 fr.all.CookieManagerHTTPS:Hôtes sécurisés via https uniquement


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to