[links-list] 401-authentication required

Edwin Groothuis mavetju at chello.nl
Thu Feb 15 03:04:32 PST 2001


Hello,

Links is great, would like to help a little with adding
authentication-functionality to it. To show my good euh... intentions,
here a small patch which at least alerts you on the fact that it's
a protected page you're trying to access. Let me know if you
appreciate it.

Edwin

-- 
Edwin Groothuis   |           Interested in MUDs? Visit Fatal Dimensions:
mavetju at chello.nl |                     http://fataldimensions.nl.eu.org/
------------------+               telnet://fataldimensions.nl.eu.org:4000
-------------- next part --------------
--- /usr/ports/www/links/work/links-0.95/http.c	Tue Jan  2 12:55:24 2001
+++ http.c	Wed Feb 14 16:56:31 2001
@@ -502,6 +502,12 @@
 		abort_connection(c);
 		return;
 	}
+	if (h == 401) {
+		mem_free(head);
+		setcstate(c, S_HTTP_401);
+		abort_connection(c);
+		return;
+	}
 	if (h == 304) {
 		mem_free(head);
 		setcstate(c, S_OK);
--- /usr/ports/www/links/work/links-0.95/sched.c	Sun Dec 31 23:26:52 2000
+++ sched.c	Thu Feb 15 11:38:09 2001
@@ -989,6 +989,7 @@
 	S_HTTP_ERROR,		TEXT(T_BAD_HTTP_RESPONSE),
 	S_HTTP_100,		TEXT(T_HTTP_100),
 	S_HTTP_204,		TEXT(T_NO_CONTENT),
+	S_HTTP_401,		TEXT(T_HTTP_401),
 
 	S_FILE_TYPE,		TEXT(T_UNKNOWN_FILE_TYPE),
 	S_FILE_ERROR,		TEXT(T_ERROR_OPENING_FILE),
--- /usr/ports/www/links/work/links-0.95/language.h	Tue Jan  2 13:04:05 2001
+++ language.h	Thu Feb 15 11:58:48 2001
@@ -362,4 +362,5 @@
 #define T_HK_FULL_SCREEN    358	
 #define T_HK_BEOS_TERMINAL    359	
 #define T_HK_NEW_WINDOW    360	
-#define T__N_TEXTS    361	
+#define T_HTTP_401    361	
+#define T__N_TEXTS    362	
--- /usr/ports/www/links/work/links-0.95/links.h	Sun Dec 31 23:26:52 2000
+++ links.h	Wed Feb 14 16:54:54 2001
@@ -699,6 +699,7 @@
 #define S_HTTP_ERROR		-1100
 #define S_HTTP_100		-1101
 #define S_HTTP_204		-1102
+#define S_HTTP_401		-1103
 
 #define S_FILE_TYPE		-1200
 #define S_FILE_ERROR		-1201
--- /usr/ports/www/links/work/links-0.95/intl/brazilian_portuguese.lng	Tue Jan  2 13:04:02 2001
+++ intl/brazilian_portuguese.lng	Thu Feb 15 11:57:43 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/bulgarian.lng	Tue Jan  2 13:04:03 2001
+++ intl/bulgarian.lng	Thu Feb 15 11:57:46 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, NULL,
 T_HK_BEOS_TERMINAL, NULL,
 T_HK_NEW_WINDOW, NULL,
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/czech.lng	Tue Jan  2 13:04:03 2001
+++ intl/czech.lng	Thu Feb 15 11:57:49 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "C",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/english.lng	Tue Jan  2 13:01:56 2001
+++ intl/english.lng	Thu Feb 15 11:56:51 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401,"401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/estonian.lng	Tue Jan  2 13:04:03 2001
+++ intl/estonian.lng	Thu Feb 15 11:57:55 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/french.lng	Tue Jan  2 13:04:03 2001
+++ intl/french.lng	Thu Feb 15 11:57:57 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/german.lng	Tue Jan  2 13:04:03 2001
+++ intl/german.lng	Thu Feb 15 11:58:00 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/hungarian.lng	Tue Jan  2 13:04:03 2001
+++ intl/hungarian.lng	Thu Feb 15 11:58:03 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/icelandic.lng	Tue Jan  2 13:04:03 2001
+++ intl/icelandic.lng	Thu Feb 15 11:58:06 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/italian.lng	Tue Jan  2 13:04:03 2001
+++ intl/italian.lng	Thu Feb 15 11:58:09 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/lithuanian.lng	Tue Jan  2 13:04:03 2001
+++ intl/lithuanian.lng	Thu Feb 15 11:58:13 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/polish.lng	Tue Jan  2 13:04:03 2001
+++ intl/polish.lng	Thu Feb 15 11:58:17 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, NULL,
 T_HK_BEOS_TERMINAL, NULL,
 T_HK_NEW_WINDOW, NULL,
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/russian.lng	Tue Jan  2 13:04:04 2001
+++ intl/russian.lng	Thu Feb 15 11:58:20 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, NULL,
 T_HK_BEOS_TERMINAL, NULL,
 T_HK_NEW_WINDOW, NULL,
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/spanish.lng	Tue Jan  2 13:04:04 2001
+++ intl/spanish.lng	Thu Feb 15 11:58:23 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/swedish.lng	Tue Jan  2 13:04:04 2001
+++ intl/swedish.lng	Thu Feb 15 11:58:26 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "F",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "N",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/turkish.lng	Tue Jan  2 13:04:04 2001
+++ intl/turkish.lng	Thu Feb 15 11:58:30 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, "T",
 T_HK_BEOS_TERMINAL, "B",
 T_HK_NEW_WINDOW, "Y",
+T_HTTP_401, "401: Authentication required (not supported yet)",
--- /usr/ports/www/links/work/links-0.95/intl/ukrainian.lng	Tue Jan  2 13:04:04 2001
+++ intl/ukrainian.lng	Thu Feb 15 11:58:33 2001
@@ -358,3 +358,4 @@
 T_HK_FULL_SCREEN, NULL,
 T_HK_BEOS_TERMINAL, NULL,
 T_HK_NEW_WINDOW, NULL,
+T_HTTP_401, "401: Authentication required (not supported yet)",


More information about the links-list mailing list