[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Patch for Links to support about:blank



I wrote a patch for Links to support about:XXX URLs by returning an 
empty result.  I find the reasoning that "we don't care that Mozilla 
supports a nonstandard feature but for Links we're going to be all 
uptight" to be, well, bothersome.  I like orthogonality.

Until Mozilla removes support for it, I'll keep patching Links, even if 
only I care :-)

----- Forwarded message from  -----
tom@desk:~$ diff -r links-0.98/url.c links-0.98-patched/url.c
12a13
>               {"about", 0, about_func, NULL, 1, 0, 0},
tom@desk:~$ cat links-0.98-patched/about.c
#include "links.h"

void about_func(struct connection *c)
{
        struct cache_entry *e;
        unsigned char *head = NULL;
        if (anonymous) {
                setcstate(c, S_BAD_URL);
                abort_connection(c);
                return;
        }
        if (get_cache_entry(c->url, &e)) {
                setcstate(c, S_OUT_OF_MEM); abort_connection(c); return;
        }
        if (e->head) mem_free(e->head);
        e->head = head;
        c->cache = e;
        c->cache->incomplete = 0;
        setcstate(c, S_OK);
        abort_connection(c);
}

tom@desk:~$ diff links-0.98/links.h links-0.98-patched/links.h
881a882,885
> /* about.c */
>
> void about_func(struct connection *);
>
----- End forwarded message -----



Reply to: