[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LYNX-DEV Saving User Agent
From: |
Brian Tillman, x8425 |
Subject: |
LYNX-DEV Saving User Agent |
Date: |
Tue, 04 Mar 1997 09:21:36 EST |
I realize that saving the User Agent string was deliberately left out of
LYrcFile.c, but if anyone's interested, here's a patch that adds it:
*** lyrcfile.c-orig Mon Mar 3 22:43:38 1997
--- lyrcfile.c Mon Mar 3 22:43:38 1997
***************
*** 419,424 ****
--- 419,436 ----
user_mode = NOVICE_MODE;
}
+ /*
+ * User Agent string.
+ */
+ } else if ((cp = LYstrstr(line_buffer,
+ "user_agent")) != NULL &&
+ cp-line_buffer < number_sign) {
+ if ((cp2 = (char *)strchr(cp, '=')) != NULL)
+ cp = cp2 + 1;
+ while (isspace(*cp))
+ cp++; /* get rid of spaces */
+ StrAllocCopy(LYUserAgent, cp);
+
#ifdef ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS
/*
* Local execution mode - all links.
***************
*** 742,747 ****
--- 754,775 ----
(user_mode == NOVICE_MODE ? "NOVICE" :
(user_mode == ADVANCED_MODE ?
"ADVANCED" : "INTERMEDIATE")));
+
+ /*
+ * User Agent string.
+ */
+ fprintf(fp, "\
+ # The user agent string identifies the user agent to the server. Changes\n\
+ # may be disallowed via the -restrictions switch. Otherwise, the header\n\
+ # can be changed to a string such as L_y_n_x/2.7 for access to sites\n\
+ # which discriminate agains Lynx based on checks for the presence of \n\
+ # \"Lynx\" in the header.\n\
+ #\n\
+ # WARNING - The Netscape Communications Corp. has claimed that false\n\
+ # transmissions of \"Mozilla\" as the User-Agent are copyright\n\
+ # infringement, which will be prosecuted. DO NOT misrepresent\n\
+ # Lynx as Mozilla.\n");
+ fprintf(fp, "user_agent=%s\n\n", (LYUserAgent ? LYUserAgent : ""));
#if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS)
/*
-----------------------------+--------------------------------
Brian Tillman | Internet: address@hidden
Smiths Industries, Inc. | address@hidden
4141 Eastern Ave., MS239 | Hey, I said this stuff myself.
Grand Rapids, MI 49518-8727 | My company has no part in it.
-----------------------------+--------------------------------
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- LYNX-DEV Saving User Agent,
Brian Tillman, x8425 <=