diff -ru links-0.96/links.1 links-0.96+newmanpage/links.1
--- links-0.96/links.1	Sun Dec 31 23:26:52 2000
+++ links-0.96+newmanpage/links.1	Sat Oct  6 14:53:51 2001
@@ -1,13 +1,19 @@
 .\" Process this file with groff -man -Tascii links.1
-.TH LINKS 1 "Dec, 2000"
+.TH LINKS 1 "Oct, 2001"
+
+
 .SH NAME
 links \- lynx-like alternative character mode WWW browser
+
+
 .SH SYNOPSIS
 .B links
 .I "[options] URL"
+
+
 .SH DESCRIPTION
 .B links
-is a text mode WWW browser with ncurses interface, supporting
+is a text mode WWW browser, supporting
 colors, correct table rendering, background downloading, menu
 driven configuration interface and slim code.
 .P 
@@ -16,41 +22,49 @@
 are supported via external clients.
 .P
 .I links
-can handle local (file://) or remote (http:// or ftp://) URLs.
+can handle local (file://) or remote (http://, ftp:// or https://
+if there's compiled-in SSL support) URLs.
 .PP
 
+
 .SH OPTIONS
 Most options can be set in the user
 interface or config file, so usually you do not need to care about them.
 
 .TP
-\f3-async-dns \f2<0>/<1>\f1
-Asyncronous DNS resolver on(1)/off(0). 
+\f3-anonymous\f1
+Restrict links so that it can run on an anonymous account.
+No local file browsing. No downloads. Executing of viewers
+is allowed, but user can't add or modify entries in
+association table.
 
 .TP
-\f3-max-connections \f2<max>\f1
-Maximum number of concurrent connections.
-(default: 10)
+\f3-assume-codepage \f2<codepage>\f1
+Use the given codepage when the webpage did not specify
+its codepage. (default: ISO 8859-1)
 
 .TP
-\f3-max-connections-to-host \f2<max>\f1
-Maximum number of concurrent connection to a given host.
-(default: 2)
+\f3-async-dns \f2<0>/<1>\f1
+Asynchronous DNS resolver on(1)/off(0). Default is on.
 
 .TP
-\f3-retries \f2<retry>\f1
-Number of retries.
-(default: 3)
+\f3-base-session \f2<number>\f1
+Linkses are connecting together, forming sessions by default. Normally,
+there's only one session with number 0. In this way, you can make him
+to form more sessions at once. See also \f3-no-connect\f1 option.
 
 .TP
-\f3-receive-timeout \f2<sec>\f1
-Timeout on receive.
-(default: 120)
+\f3-download-dir \f2<path>\f1
+Default download directory.
+(default: actual dir)
 
 .TP
-\f3-unrestartable-receive-timeout \f2<sec>\f1
-Timeout on non restartable connections.
-(default: 600)
+\f3-download-utime \f2<0>/<1>\f1
+Set time of download files on(1)/off(0). Default is off.
+
+.TP
+\f3-dump\f1
+Write a plain-text version of the given HTML document to stdout.
 
 .TP
 \f3-format-cache-size \f2<num>\f1
@@ -58,62 +72,97 @@
 (default: 5)
 
 .TP
-\f3-memory-cache-size \f2<Kbytes>\f1
-Cache memory in Kilobytes.
-(default: 1024)
+\f3-ftp.anonymous-password \f2<password>\f1
+Use this as the password for anonymous ftp sites.
 
 .TP
-\f3-http-proxy \f2<host:port>\f1
-Host and port number of the HTTP proxy, or blank.
+\f3-ftp-proxy \f2<host:port>\f1
+Host and port number of the FTP proxy, or blank.
 (default: blank)
 
 .TP
-\f3-ftp-proxy \f2<host:port>\f1
-Host and port number of the FTP proxy, or blank.
+\f3-help\f1
+Print a help screen.
+
+.TP
+\f3-http-bugs.http10 \f2<0>/<1>\f1
+Turn use of HTTP/1.0 on(1)/off(0). Default is off.
+
+.TP
+\f3-http-bugs.allow-blacklist \f2<0>/<1>\f1
+Turn blacklist of buggy servers on(1)/off(0). Default is on.
+
+.TP
+\f3-http-bugs.bug-302-redirect \f2<0>/<1>\f1
+Turn broken redirect 302 (violates RFC, but compatible with Netscape)
+on(1)/off(0). Default is off.
+
+.TP
+\f3-http-bugs.bug_post-no-keepalive \f2<0>/<1>\f1
+Turn no keepalive connection after POST request (for some buggy
+PHP databases) on(1)/off(0). Default is off.
+
+.TP
+\f3-http-proxy \f2<host:port>\f1
+Host and port number of the HTTP proxy, or blank.
 (default: blank)
 
 .TP
-\f3-download-dir \f2<path>\f1
-Default download directory.
-(default: actual dir)
+\f3-language \f2<langname>\f1
+Language to use in user interface.
 
 .TP
-\f3-assume-codepage \f2<codepage>\f1
-Use the given codepage when the webpage did not specify
-its codepage. (default: ISO 8859-1)
+\f3-max-connections \f2<max>\f1
+Maximum number of concurrent connections.
+(default: 10)
 
 .TP
-\f3-anonymous\f1
-Restrict links so that it can run on an anonymous account.
-No local file browsing. No downloads. Executing of viewers
-is allowed, but user can't add or modify entries in
-association table.
+\f3-max-connections-to-host \f2<max>\f1
+Maximum number of concurrent connection to a given host.
+(default: 2)
 
 .TP
-\f3-dump\f1
-Write a plain-text version of the given HTML document to stdout.
+\f3-memory-cache-size \f2<Kbytes>\f1
+Cache memory in Kilobytes.
+(default: 1024)
 
 .TP
 \f3-no-connect\f1
 Runs links as a separate instance - instead of connecting to
-existing instance.
+existing instance. Prevents him to connecting to an existing session.
+See also \f3-base-session\f1 option.
+
+.TP
+\f3-receive-timeout \f2<sec>\f1
+Timeout on receive.
+(default: 120)
+
+.TP
+\f3-retries \f2<retry>\f1
+Number of retries.
+(default: 3)
 
 .TP
 \f3-source\f1
 Write the given HTML document in source form to stdout.
 
 .TP
+\f3-unrestartable-receive-timeout \f2<sec>\f1
+Timeout on non restartable connections.
+(default: 600)
+
+.TP
 \f3-version\f1
 Print the 
 .I links
 version number and exit.
 
-.TP
-\f3-help\f1
-Print a help screen.
 
 .SH NAVIGATION KEYS
-The keys you may use while navigating are
+You may optionally prefix each of this keys with a number, telling its
+repeat count (how much times to do it). You can also re-bind those keys,
+altough this feature is still in the state of testing, so undocumented.
+The keys you may use for navigation are:
 .TP
 .B PGDN
 page down
@@ -227,16 +276,16 @@
 quit
 .TP
 .B =
-document informations
+document information
 .TP
 .B |
-header informations
+header information
 .TP
 .B \e
 toggle HTML source/rendered view
 .TP
 .B *
-toggle display images
+toggle display of images
 .TP
 .B TAB
 next frame
@@ -250,6 +299,7 @@
 .B F10
 file menu
 
+
 .SH EDITING KEYS
 The following keys can be used while editing a line/jumping to a URL:
 .TP
@@ -260,16 +310,16 @@
 move left
 .TP
 .B HOME
-jump at the beginning
+jump to the beginning
 .TP
 .B ^A
-jump at the beginning
+jump to the beginning
 .TP
 .B END
-jump at the end
+jump to the end
 .TP
 .B ^E
-jump at the end
+jump to the end
 .TP
 .B ^INS
 copy to clipboard
@@ -308,32 +358,93 @@
 auto complete line
 
 
+.SH ENVIRONMENT
+.TP
+
+.IP CONFIG_DIR
+The location of ".links/"
+
+.IP WWW_HOME
+Homepage location (as in 
+.B lynx
+)
+
+.IP LINKS_XTERM
+The command to run when selecting "File/New window" and if
+.B DISPLAY
+is defined (default "xterm -e")
+
+.IP LINKS_TWTERM
+The command to run when selecting "File/New window" and if
+.B TWDISPLAY
+is defined (default "twterm -e")
 
+.IP SHELL
+Used for "File/OS Shell" menu
+
+.IP COMSPEC
+Used for "File/OS Shell" menu in DOS/Windows
 
 
 .SH FILES
 .TP
-.IP "~/.links/.links.cfg"
-Per-user configfile, automatically created by
+
+.IP "~/.links/links.cfg"
+Per-user config file, automatically created by
+.B links. 
+Its format is same as the one of
+.I user.cfg.
+
+.IP "~/.links/html.cfg"
+Per-user config file, automatically created by
 .B links.
+It contains HTML rendering options. Its format is same as the one of
+.I user.cfg.
+
+.IP "~/.links/user.cfg"
+Per-user config file, not overwritten while saving
+.B links
+configuration. You can add your own options there (e.g. keybindings).
+Each line consists from option name (same as the command-line one,
+but without leading dash and with dashes converted to underscores),
+space, and its value, in quotes if it's a string. Lines which start
+with # are considered as comments and skipped.
+
+.IP "~/.links/bookmarks"
+Bookmarks file
+
+.IP "~/.links/links.his"
+Sites history file
+
+.IP "~/.links/socket"
+Internal links socket for communication between its instances.
+
+
 .SH PLATFORMS
 .B links
-is known to work on Linux, FreeBSD, Solaris, IRIX, HPUX, Digital Unix, AIX,
+is known to work on Linux, FreeBSD, OpenBSD, Solaris, IRIX, HPUX, Digital Unix, AIX,
 OS/2 and BeOS.
 Port for Win32 is in state of beta testing.
+
+
 .SH BUGS
 Can't connect to some FTP servers (Novell, NT). Connection stays in "Request
 sent" state.
 .PP
-Frames don't work if there's more frames with same name. Turn them off in such
+Frames don't work if there're more frames with same name. Turn them off in such
 case.
 .PP
 You can't upload large files; it takes _lots_ of memory.
 .PP
-You shoudn't press '^Z' when you are in a viewer
+You shouldn't press '^Z' when you are in a viewer
 .PP
-Please report any other bugs you find to Mikulas Patocka
-<mikulas@artax.karlin.mff.cuni.cz>
+Please report any other bugs you find to
+.B Mikulas Patocka
+.BI <mikulas@artax.karlin.mff.cuni.cz>
+or to
+.B links mailing list
+.BI <links-list@linuxfromscratch.org>.
+
 
 .SH LICENSE
 .B links
@@ -342,14 +453,15 @@
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.
 
+
 .SH AUTHOR
 .I links
 was written by 
 .B Mikulas Patocka 
 .BI <mikulas@artax.karlin.mff.cuni.cz>.
 See file 
-.I Authors
-for a list of people contributing to this project.
+.I AUTHORS
+in the source tree for a list of people contributing to this project.
 .P
 The homepage of links can be found at
 .BI http://links.browser.org/
@@ -359,7 +471,11 @@
 .I links
 fan
 for the Debian GNU/Linux system (but may be used by others).
+Contributions from Francis A. Holop. Extended, clarified
+and made more up-to-date by Petr Baudis <pasky@ji.cz>.
+
 
 .SH "SEE ALSO"
 .BR lynx (1),
-.BR w3m (1)
+.BR w3m (1),
+.BR wget (1)
diff -ru links-0.96/AUTHORS links-0.96+admin/AUTHORS
--- links-0.96/AUTHORS	Sat Jun 23 01:00:00 2001
+++ links-0.96+admin/AUTHORS	Sat Oct  6 22:21:56 2001
@@ -181,3 +181,10 @@
 Nalin Dahyabhai <nalin@redhat.com>
 	Fixed occasional destroying of read buffer on Alpha
 
+Petr Baudis <pasky@ji.cz>
+	Cookies expiring and saving
+	True HTTP referrer
+	Textarea edit in external editor (still broken)
+	Manpage updates
+	Random fixes
+	Maintainer of links-pb tree
diff -ru links-0.96/ChangeLog links-0.96+admin/ChangeLog
--- links-0.96/ChangeLog	Mon Jul  2 02:26:02 2001
+++ links-0.96+admin/ChangeLog	Sat Oct  6 22:26:19 2001
@@ -1,3 +1,20 @@
+=== RELEASE 0.96-pb2 ===
+
+Sat Oct  6 22:22:49 CEST 2001 Petr Baudis <pasky@ji.cz>:
+
+	* cookies expiration, saving and resaving
+	* do NOT strip everything after ? in form action
+	* http referer, true http referer
+	* limited textarea external editor support
+	* partial fix of &#13;
+	* enhanced manual page
+	* fixed multi-level HTTP moved when using -dump/-source
+	* fixed keybindings
+
+=== RELEASE 0.96-pb1 ===
+
+	untracked
+
 === RELEASE 0.96 ===
 
 Mon Jul  2 03:25:39 MET DST 2001 Serge Winitzki <serge@scriabin.PHYS.cwru.edu>:
diff -ru links-0.96/README links-0.96+admin/README
--- links-0.96/README	Sun Dec 31 23:26:52 2000
+++ links-0.96+admin/README	Sat Oct  6 22:21:56 2001
@@ -7,46 +7,17 @@
 See end of file default.c for list of options. Most options can be set in luser
 interface or config file, so you do not need to care about them.
 
-GLOBAL KEYS:
-------------
+See also the manpage for more detailed description of links and its features.
 
-ESC,F9		menu
-F10		menu "files"
-TAB		next frame
-LEFT		back
-CTRL-r,R	reload
-g		goto URL dialog
-G		goto URL dialog with current URL
-a,A		add bookmark dialog
-s,S		bookmarks menu
-q,Q		quit with confirmation
-CTRL-c,C	quit without confirmation
-=		URL info
-|		header info
-\		toggle source
+This is the links-pb tree - not officional links release! It contains more
+features and some bugfixes, but is more experimental.
 
+You can get latest version from http://pasky.ji.cz/~pasky/dev/links. There's
+the whole pb patch available, and broken up smaller patches, from which
+the pb patch consists (it consists just from them, nothing additional
+is there). Always read the README file, it will tell you exactly from what
+the patch consists and dependencies between supplied patches.
 
-KEYS WITHIN FRAME:
-------------------
-
-PGDN,SPACE	next page
-PGUP,b,B	previous page
-DOWN		next link
-UP		previous link
-INS,CTRL-p,P	scroll up
-DEL,CTRL-n,N	scroll down
-[		scroll left
-]		scroll right
-HOME		top of the document
-END		bottom of the document
-RIGHT,ENTER	follow link
-d,D		download link
-/		search (forward) dialog
-?		search (backward) dialog
-n		next search
-N		previous search
-f,F		frame at full screen
-0-9		repeat prefix or go to numbered link
-Alt-0-Alt-9	repeat prefix
+Good luck!
 
 vim: textwidth=80
diff -ru links-0.96/SITES links-0.96+admin/SITES
--- links-0.96/SITES	Fri Mar 23 03:18:19 2001
+++ links-0.96+admin/SITES	Sat Oct  6 22:21:56 2001
@@ -20,7 +20,10 @@
 	ftp://ftp.scripty.com/pub/redhat/6.x/SRPMS/links-0.95-1.src.rpm
 
 Mailing list:
-	links-list@appwatch.com
-	links-subscribe@appwatch.com
-	links-help@appwatch.com
+	http://links.sf.net/mailing.html
+	links-list@linuxfromscratch.com (bugs, announces)
+	links-discuss@linuxfromscratch.com (developers)
+	listar@linuxfromscratch.com (Subject: subscribe links-list)
 
+pb tree:
+	http://pasky.ji.cz/~pasky/dev/link/
diff -ru links-0.96/TODO links-0.96+admin/TODO
--- links-0.96/TODO	Sun Dec 31 23:26:52 2000
+++ links-0.96+admin/TODO	Sat Oct  6 22:27:12 2001
@@ -1,24 +1,31 @@
 HTTP User/password
 
-Bookmarks
-
-Cookies (I don't like them, so someone else must do it)
+Cookies manager
 
 NNTP
 
-Html frames (parts of code are ready)
-
 Rewrite html parser
 
 Disk cache
 
 IPv6 support
 
-SSL
-
-Rebindable keys
+User interface for rebindable keys
 
 Passing url to external command
 
 Write some documentation
 
+&#13; broken in <pre>, fixed only partially when using -dump
+
+Fix calling of textarea external editor
+
+EcmaScript support
+
+CSS support
+
+Multiple windows in one console
+
+Better tunability from user interface
+
+-- see INFO file for most actual TODO list for -pb tree
diff -ru links-0.96/config2.h links-0.96+admin/config2.h
--- links-0.96/config2.h	Mon Jul  2 02:25:24 2001
+++ links-0.96+admin/config2.h	Sat Oct  6 22:21:56 2001
@@ -5,7 +5,7 @@
 #define PACKAGE "links"
 
 /* Version number of package */
-#define VERSION "0.96"
+#define VERSION "0.96-pb2"
 
 /* Define to empty if the keyword does not work.  */
 /* #undef const */
diff -ru links-0.96/configure links-0.96+admin/configure
--- links-0.96/configure	Mon Jul  2 02:28:55 2001
+++ links-0.96+admin/configure	Sat Oct  6 22:21:56 2001
@@ -694,7 +694,7 @@
 
 PACKAGE=links
 
-VERSION=0.96
+VERSION=0.96-pb2
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
diff -ru links-0.96/configure.in links-0.96+admin/configure.in
--- links-0.96/configure.in	Mon Jul  2 02:25:15 2001
+++ links-0.96+admin/configure.in	Sat Oct  6 22:21:56 2001
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(main.c)
 
-AM_INIT_AUTOMAKE(links, 0.96)
+AM_INIT_AUTOMAKE(links, 0.96-pb2)
 AM_CONFIG_HEADER(config.h)
 
 dnl Checks for programs.
diff -rNu links-0.96/INFO links-0.96+admin/INFO
--- links-0.96/INFO	Thu Jan  1 01:00:00 1970
+++ links-0.96+admin/INFO	Sat Oct  6 22:33:32 2001
@@ -0,0 +1,209 @@
+all those patches are lying at http://pasky.ji.cz/~pasky/dev/links/.
+
+all those patches against links-lua, however should apply w/o probs to ordinary links
+as well. nevertheless check http://links.sourceforge.net/links-lua/ for links-lua, it's
+a GREAT thing :-)
+
+
+
+  TODO: (nope, i don't expect implementing everything from this list :-)
+        - http auth (urgent)
+	- clear support of editarea
+	- merge nice things from ftp://ftp.civo.aca.nsc.ru/userq/qmax/patches/
+	- cookies manager
+	- css support
+	- ecmascript support
+	- windowing support
+	- make most my patches optional on compile/run time
+	- IPv6 support
+	- rewrite HTML parser
+	- user interface for rebinding of keys
+	- documentation
+
+
+
+
+links-0.96-pb2
+~~~~~~~~~~~~~~
+  this package is just a compilation of several useful patches for links, for authors and
+  details see their description bellow.
+
+  this patch contains:
+  - referer-0.96.patch true-referer-0.96.patch true-referer-0.96-man.patch
+    true-referer-0.96-lng.patch
+  - editarea-0.96.patch editarea-0.96-man.patch
+  - cookies-expire-0.96.patch cookies-save-0.96.patch cookies-resave-0.96.patch
+    cookies-save-0.96-man.patch cookies-resave-0.96-man.patch
+  - crfix-0.96.patch moved-0.96.patch noqstrip-0.96.patch kbindfix-0.96.patch
+  - admin-0.96-pbX.patch
+
+  there's also a -lua version of this patch, which contains -lua compatible true-referer
+  patch.
+
+  note that you need to touch * in links/ directory after patching, due to some broken
+  rules in Makefile..
+
+
+
+
+links-0.96-pb1
+~~~~~~~~~~~~~~
+  this package is just a compilation of several useful patches for links, for authors and
+  details see their description bellow.
+
+  this patch contains: referer-0.96.patch true-referer-0.96-lua.patch editarea-0.96.patch
+  cookies-expire-0.96.patch cookies-save-0.96.patch (Oct 1 ver) cookies-resave-0.96.patch
+  crfix-0.96.patch moved-0.96.patch
+
+
+
+
+referer patches
+~~~~~~~~~~~~~~~
+  referer-0.96		patch by Petr Kulhavy <brain@artax.karlin.mff.cuni.cz>
+  			depends on: N/A
+  true-referer-0.96	patch by Petr Baudis <pasky@ji.cz>
+  			depends on: referer-0.96
+  true-referer-0.96-lua	patch by Petr Baudis <pasky@ji.cz> (as previous, but for links-lua)
+  			depends on: referer-0.96
+  true-referer-0.96-lng	patch by Petr Baudis <pasky@ji.cz>
+  			depends on: referer-0.96
+  true-referer-0.96-man	patch by Petr Baudis <pasky@ji.cz>
+  			depends on: manpage-0.96
+
+  first patch adds http referer support to links, so many sites won't panic from seeing links
+  crawling around. second patch extends this capability and you can even send http referers
+  which looks just like those sent by ordinary browsers.
+
+  the last patch documents the switches added by previous patches.
+
+  after applying do either:
+  1.) cd intl; ./syncintl; cd ..;
+  2.) apply true-referer-0.96-lng patch
+  then, to be sure, do touch * (links' make rules are somewhat broken ;), and try
+  to compile it.
+
+
+cookies patches
+~~~~~~~~~~~~~~~
+  cookies-expire-0.96	patch by Petr Baudis <pasky@ji.cz>
+  			depends on: N/A
+  cookies-save-0.96	patch by Petr Baudis <pasky@ji.cz>
+  			depends on: cookies-expire-0.96
+  cookies-resave-0.96	patch by Petr Baudis <pasky@ji.cz>
+  			depends on: cookies-save-0.96
+  cookies-save-0.96-man	patch by Petr Baudis <pasky@ji.cz>
+  			depends on: manpage-0.96
+  cookies-resave-0.96-man	patch by Petr Baudis <pasky@ji.cz>
+  			depends on: manpage-0.96
+
+  first patch adds possibility of cookie expiration, it's very tiny (compared to the one
+  which actually can be found on download sites of links) etc :-). second patch extends this
+  possibility and it saves/restores cookies (not expired ones, of course, and not the ones
+  about which you didn't say they should expire with browser shutdown) from the file at
+  shutdown/start of links.
+
+  the resave patch is kinda arcane - it will save ~/.links/cookies every time it will get a
+  cookie, and it will add a keybinding cookies-load (^K), which will re-load ~/.links/cookies
+  and modify internal cookies list accordingly. so you can edit your cookies in your favorite
+  editor, and add/remove/modify ones.
+
+  the two last patches document the ~/.links/cookies file or ^K key respective.
+
+  note that the cookies-save patch was fixed at Mon Oct  1 14:12:17 CEST 2001 - the previous one
+  contained potential problem when cookies file was broken.
+  
+  after applying just compile :-)
+
+
+moved patch
+~~~~~~~~~~~
+  moved-0.96		patch by Petr Baudis <pasky@ji.cz>
+  			depends on: N/A
+
+  this patch fixes small bug in links' -dump/-source feature - it correctly handles
+  relative redirect on the site you want to download...
+  
+  after applying just compile :-)
+
+
+editarea patch
+~~~~~~~~~~~~~~
+  editarea-0.96		patch by Petr Baudis <pasky@ji.cz>
+  			depends on: N/A
+  editarea-0.96-man	patch by Petr Baudis <pasky@ji.cz>
+  			depends on: manpage-0.96
+
+  this patch allows you to open textarea you have actually selected in your favourite text
+  editor, make whatever changes, save it and get saved changes back in links... this can
+  be pretty useful sometimes. you will launch the editor by pressing ^T, or (theoretically,
+  not working yet) F4 in some textarea. note that textarea will update after any move of
+  cursor (will be maybe fixed as well).
+
+  BEWARE! this patch is DIRTY! you are FORBIDDEN to take any kind of inspiration from it,
+  it's just a nasty hack! it probably will make your links CRASH when you will use it
+  (hopefully not normally, just after pressing ^T ;) - but you may try it, i still wonder how
+  it even can work for me :-) i would do it in any better way, if i would ever found one :(
+  suggestions are very welcomed... normally it doesn't wait for editor to finish, so it
+  reads the old version of file, so i have to tweak with global variable etc.. brr..
+
+  after applying just compile, pray and never press ^T ;)
+
+
+crfix patch
+~~~~~~~~~~~
+  crfix-0.96		patch by Petr Baudis <pasky@ji.cz>
+  			depends on: N/A
+
+  this patch adds lynx-like behaviour to links, when &#013; entity is found. Then it
+  is just treated like &#010; one. It is not ideal, but really simple, and could be
+  useful for someone.
+
+  [later note] it works only when using -dump - unfortunately this part of html parser
+  is incredibly ugly, dirty, Mikulas had to be stoned or something when writing that,
+  i'm almost sure ;-).. and with current knowledge of links' code i'm not yet able
+  to rewrite that part completely, and even not going to, just to fix this..
+
+
+noqstrip patch
+~~~~~~~~~~~~~~
+  noqstrip-0.96		patch by Petr Baudis <pasky@ji.cz>
+  			depends on: N/A
+
+  this patch removes links' mis-feature of stripping query string (?...) from action attribute
+  of form tag. many sites depend on query string in action, and i'm not sure why is links
+  even doing it - in changelog there are google groups mentioned, but i didn't expected
+  any problems with this patch there. anyway old links' behaviour is non-standard ;-).
+
+
+manpage patch
+~~~~~~~~~~~~~
+  manpage-0.96		patch by Petr Baudis <pasky@ji.cz>
+  			depends on: N/A
+
+  this patch contains a lot of fixes in links(1) manual page, adding explanation of some
+  undocumented features etc. however, it doesn't add documentation for some features added
+  by other patches available here, they will add it themselves, however depending on this
+  patch.
+
+
+kbindfix patch
+~~~~~~~~~~~~~~
+  kbindfix-0.96		patch by Petr Baudis <pasky@ji.cz>
+  			depends on: N/A
+
+  this patch contains really tiny fix for keybinding - "reallyquit" binding was missing,
+  so there was a difference between enum{} in links.h and array in parse_act, which broke
+  things somewhat. ;-)
+
+  thanks to qMax for pointing out this problem.
+
+
+admin-pb patch
+~~~~~~~~~~~~~~
+  admin-0.96-pb2	patch by Petr Baudis <pasky@ji.cz>
+  			depends on: N/A
+
+  this patch contains just misc changes in links tree, clarifying docs coming along the
+  source and propagating itself as links-0.96-pbX :-). just to keep pbX patches really
+  breakable up completely. it won't have a big mean for you, really.
diff -u -r links-0.96-orig/default.c links-0.96/default.c
--- links-0.96-orig/default.c	Sun Apr  8 22:46:18 2001
+++ links-0.96/default.c	Wed Aug 29 09:48:33 2001
@@ -854,6 +854,9 @@
 unsigned char http_proxy[MAX_STR_LEN] = "";
 unsigned char ftp_proxy[MAX_STR_LEN] = "";
 
+unsigned char fake_referer[MAX_STR_LEN] = "";
+int referer;   /* values: REFERER_NONE (default), REFERER_SAME_URL, REFERER_FAKE */
+
 unsigned char download_dir[MAX_STR_LEN] = "";
 
 unsigned char default_anon_pass[MAX_STR_LEN] = "somebody@host.domain";
@@ -896,6 +899,8 @@
 	1, gen_cmd, num_rd, num_wr, 0, 1, &http_bugs.allow_blacklist, "http_bugs.allow_blacklist", "http-bugs.allow-blacklist",
 	1, gen_cmd, num_rd, num_wr, 0, 1, &http_bugs.bug_302_redirect, "http_bugs.bug_302_redirect", "http-bugs.bug-302-redirect",
 	1, gen_cmd, num_rd, num_wr, 0, 1, &http_bugs.bug_post_no_keepalive, "http_bugs.bug_post_no_keepalive", "http-bugs.bug_post-no-keepalive",
+	1, gen_cmd, num_rd, num_wr, 0, 2, &referer, "http_referer", "http-referer",
+	1, gen_cmd, str_rd, str_wr, 0, MAX_STR_LEN, fake_referer, "fake_referer", "fake-referer",
 	1, gen_cmd, str_rd, str_wr, 0, MAX_STR_LEN, default_anon_pass, "ftp.anonymous_password", "ftp.anonymous-password",
 	1, gen_cmd, cp_rd, NULL, 0, 0, &dds.assume_cp, "assume_codepage", "assume-codepage",
 	1, NULL, term_rd, term_wr, 0, 0, NULL, "terminal", NULL,
diff -u -r links-0.96-orig/http.c links-0.96/http.c
--- links-0.96-orig/http.c	Mon Jun 18 21:59:55 2001
+++ links-0.96/http.c	Wed Aug 29 09:48:33 2001
@@ -241,6 +241,23 @@
 	add_to_str(&hdr, &l, "User-Agent: Links (" VERSION_STRING "; ");
 	add_to_str(&hdr, &l, system_name);
 	add_to_str(&hdr, &l, ")\r\n");
+
+	switch (referer)
+	{
+		case REFERER_FAKE:
+		add_to_str(&hdr, &l, "Referer: ");
+		add_to_str(&hdr, &l, fake_referer);
+		add_to_str(&hdr, &l, "\r\n");
+		break;
+		
+		case REFERER_SAME_URL:
+		add_to_str(&hdr, &l, "Referer: ");
+		if (!post) add_to_str(&hdr, &l, u);
+		else add_bytes_to_str(&hdr, &l, u, post - u - 1);
+		add_to_str(&hdr, &l, "\r\n");
+		break;
+	}
+
 	add_to_str(&hdr, &l, "Accept: */*\r\n");
 	if (!(accept_charset)) {
 		int i;
diff -u -r links-0.96-orig/intl/english.lng links-0.96/intl/english.lng
--- links-0.96-orig/intl/english.lng	Mon Jun 11 12:00:52 2001
+++ links-0.96/intl/english.lng	Wed Aug 29 09:48:33 2001
@@ -138,6 +138,10 @@
 T_CANT_GET_SOCKET_STATE, "Can't get socket state",
 T_BAD_HTTP_RESPONSE, "Bad HTTP response",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, "Fixed HTTP Referer",
+T_REFERER_NONE, "No referer",
+T_REFERER_SAME_URL, "Send requested URL as referer",
+T_REFERER_FAKE, "Fixed referer",
 T_NO_CONTENT, "No content",
 T_UNKNOWN_FILE_TYPE, "Unknown file type",
 T_ERROR_OPENING_FILE, "Error opening file",
diff -u -r links-0.96-orig/links.h links-0.96/links.h
--- links-0.96-orig/links.h	Mon Jun 11 12:14:25 2001
+++ links-0.96/links.h	Wed Aug 29 09:48:34 2001
@@ -1988,8 +1988,14 @@
 extern struct rgb default_link;
 extern struct rgb default_vlink;
 
+#define REFERER_NONE 0
+#define REFERER_SAME_URL 1
+#define REFERER_FAKE 2
+
 extern unsigned char http_proxy[];
 extern unsigned char ftp_proxy[];
+extern unsigned char fake_referer[];
+extern int referer;
 extern unsigned char no_proxy_for[];
 extern unsigned char download_dir[];
 
diff -u -r links-0.96-orig/menu.c links-0.96/menu.c
--- links-0.96-orig/menu.c	Wed Apr 25 23:08:28 2001
+++ links-0.96/menu.c	Wed Aug 29 09:44:57 2001
@@ -438,16 +438,54 @@
  	do_dialog(term, d, getml(d, NULL));
 }
 
-unsigned char *http_labels[] = { TEXT(T_USE_HTTP_10), TEXT(T_ALLOW_SERVER_BLACKLIST), TEXT(T_BROKEN_302_REDIRECT), TEXT(T_NO_KEEPALIVE_AFTER_POST_REQUEST) };
+unsigned char *http_labels[] = { TEXT(T_USE_HTTP_10), TEXT(T_ALLOW_SERVER_BLACKLIST), TEXT(T_BROKEN_302_REDIRECT), TEXT(T_NO_KEEPALIVE_AFTER_POST_REQUEST), TEXT(T_REFERER_NONE), TEXT(T_REFERER_SAME_URL), TEXT(T_REFERER_FAKE), TEXT(T_FAKE_REFERER) };
+
+void httpopt_fn(struct dialog_data *dlg)
+{
+	struct terminal *term = dlg->win->term;
+	int max = 0, min = 0;
+	int w, rw;
+	int y = 0;
+	checkboxes_width(term, dlg->dlg->udata, &max, max_text_width);
+	checkboxes_width(term, dlg->dlg->udata, &min, min_text_width);
+	max_text_width(term, http_labels[7], &max);
+	min_text_width(term, http_labels[7], &min);
+	max_buttons_width(term, dlg->items + dlg->n - 2, 2, &max);
+	min_buttons_width(term, dlg->items + dlg->n - 2, 2, &min);
+	w = term->x * 9 / 10 - 2 * DIALOG_LB;
+	if (w > max) w = max;
+	if (w < min) w = min;
+	if (w > term->x - 2 * DIALOG_LB) w = term->x - 2 * DIALOG_LB;
+	if (w < 5) w = 5;
+	rw = 0;
+	dlg_format_checkboxes(NULL, term, dlg->items, dlg->n - 3, 0, &y, w, &rw, dlg->dlg->udata);
+	y++;
+	dlg_format_text(NULL, term, http_labels[7], 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
+	y+=2;
+	dlg_format_buttons(NULL, term, dlg->items + dlg->n - 2, 2, 0, &y, w, &rw, AL_CENTER);
+	w = rw;
+	dlg->xw = rw + 2 * DIALOG_LB;
+	dlg->yw = y + 2 * DIALOG_TB;
+	center_dlg(dlg);
+	draw_dlg(dlg);
+	y = dlg->y + DIALOG_TB + 1;
+	dlg_format_checkboxes(term, term, dlg->items, dlg->n - 3, dlg->x + DIALOG_LB, &y, w, NULL, dlg->dlg->udata);
+	y++;
+	dlg_format_text(term, term, http_labels[7], dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
+	dlg_format_field(term, term, dlg->items + 7, dlg->x + DIALOG_LB, &y, w, NULL, AL_LEFT);
+	y++;
+	dlg_format_buttons(term, term, dlg->items + dlg->n - 2, 2, dlg->x + DIALOG_LB, &y, w, &rw, AL_CENTER);
+}
+
 
 int dlg_http_options(struct dialog_data *dlg, struct dialog_item_data *di)
 {
 	struct http_bugs *bugs = (struct http_bugs *)di->cdata;
 	struct dialog *d;
-	if (!(d = mem_alloc(sizeof(struct dialog) + 7 * sizeof(struct dialog_item)))) return 0;
-	memset(d, 0, sizeof(struct dialog) + 7 * sizeof(struct dialog_item));
+	if (!(d = mem_alloc(sizeof(struct dialog) + 11 * sizeof(struct dialog_item)))) return 0;
+	memset(d, 0, sizeof(struct dialog) + 11 * sizeof(struct dialog_item));
 	d->title = TEXT(T_HTTP_BUG_WORKAROUNDS);
-	d->fn = checkbox_list_fn;
+	d->fn = httpopt_fn;
 	d->udata = http_labels;
 	d->items[0].type = D_CHECKBOX;
 	d->items[0].gid = 0;
@@ -465,15 +503,33 @@
 	d->items[3].gid = 0;
 	d->items[3].dlen = sizeof(int);
 	d->items[3].data = (void *)&bugs->bug_post_no_keepalive;
-	d->items[4].type = D_BUTTON;
-	d->items[4].gid = B_ENTER;
-	d->items[4].fn = ok_dialog;
-	d->items[4].text = TEXT(T_OK);
-	d->items[5].type = D_BUTTON;
-	d->items[5].gid = B_ESC;
-	d->items[5].fn = cancel_dialog;
-	d->items[5].text = TEXT(T_CANCEL);
-	d->items[6].type = D_END;
+	d->items[4].type = D_CHECKBOX;
+	d->items[4].gid = 1;
+	d->items[4].gnum = REFERER_NONE;
+	d->items[4].dlen = sizeof(int);
+	d->items[4].data = (void *)&referer;
+	d->items[5].type = D_CHECKBOX;
+	d->items[5].gid = 1;
+	d->items[5].gnum = REFERER_SAME_URL;
+	d->items[5].dlen = sizeof(int);
+	d->items[5].data = (void *)&referer;
+	d->items[6].type = D_CHECKBOX;
+	d->items[6].gid = 1;
+	d->items[6].gnum = REFERER_FAKE;
+	d->items[6].dlen = sizeof(int);
+	d->items[6].data = (void *)&referer;
+	d->items[7].type = D_FIELD;
+	d->items[7].dlen = MAX_STR_LEN;
+	d->items[7].data = fake_referer;
+	d->items[8].type = D_BUTTON;
+	d->items[8].gid = B_ENTER;
+	d->items[8].fn = ok_dialog;
+	d->items[8].text = TEXT(T_OK);
+	d->items[9].type = D_BUTTON;
+	d->items[9].gid = B_ESC;
+	d->items[9].fn = cancel_dialog;
+	d->items[9].text = TEXT(T_CANCEL);
+	d->items[10].type = D_END;
  	do_dialog(dlg->win->term, d, getml(d, NULL));
 	return 0;
 }
diff -ru links-0.96/default.c links-0.96+true-referer/default.c
--- links-0.96/default.c	Sat Oct  6 17:16:08 2001
+++ links-0.96+true-referer/default.c	Sat Oct  6 17:13:57 2001
@@ -855,7 +855,7 @@
 unsigned char ftp_proxy[MAX_STR_LEN] = "";
 
 unsigned char fake_referer[MAX_STR_LEN] = "";
-int referer;   /* values: REFERER_NONE (default), REFERER_SAME_URL, REFERER_FAKE */
+int referer;   /* values: REFERER_NONE (default), REFERER_TRUE, REFERER_SAME_URL, REFERER_FAKE */
 
 unsigned char download_dir[MAX_STR_LEN] = "";
 
@@ -899,7 +899,7 @@
 	1, gen_cmd, num_rd, num_wr, 0, 1, &http_bugs.allow_blacklist, "http_bugs.allow_blacklist", "http-bugs.allow-blacklist",
 	1, gen_cmd, num_rd, num_wr, 0, 1, &http_bugs.bug_302_redirect, "http_bugs.bug_302_redirect", "http-bugs.bug-302-redirect",
 	1, gen_cmd, num_rd, num_wr, 0, 1, &http_bugs.bug_post_no_keepalive, "http_bugs.bug_post_no_keepalive", "http-bugs.bug_post-no-keepalive",
-	1, gen_cmd, num_rd, num_wr, 0, 2, &referer, "http_referer", "http-referer",
+	1, gen_cmd, num_rd, num_wr, 0, 3, &referer, "http_referer", "http-referer",
 	1, gen_cmd, str_rd, str_wr, 0, MAX_STR_LEN, fake_referer, "fake_referer", "fake-referer",
 	1, gen_cmd, str_rd, str_wr, 0, MAX_STR_LEN, default_anon_pass, "ftp.anonymous_password", "ftp.anonymous-password",
 	1, gen_cmd, cp_rd, NULL, 0, 0, &dds.assume_cp, "assume_codepage", "assume-codepage",
diff -ru links-0.96/http.c links-0.96+true-referer/http.c
--- links-0.96/http.c	Sat Oct  6 17:16:08 2001
+++ links-0.96+true-referer/http.c	Sat Oct  6 17:13:57 2001
@@ -249,9 +249,32 @@
 		add_to_str(&hdr, &l, fake_referer);
 		add_to_str(&hdr, &l, "\r\n");
 		break;
+
+		case REFERER_TRUE:
+		if (c->prev_url && c->prev_url[0])
+		{
+		  unsigned char *etk;
+		  add_to_str(&hdr, &l, "Referer: ");
+		  if (etk = strchr(c->prev_url, '\1')) /* braindead ;-) */
+		    add_bytes_to_str(&hdr, &l, c->prev_url, etk - c->prev_url);
+		  else
+		    add_to_str(&hdr, &l, c->prev_url);
+		  add_to_str(&hdr, &l, "\r\n");
+	        }
+		break;
 		
 		case REFERER_SAME_URL:
-		add_to_str(&hdr, &l, "Referer: ");
+		add_to_str(&hdr, &l, "Referer: http://");
+		if ((h = get_host_name(host))) {
+			add_to_str(&hdr, &l, h);
+			mem_free(h);
+			if ((h = get_port_str(host))) {
+				add_to_str(&hdr, &l, ":");
+				add_to_str(&hdr, &l, h);
+				mem_free(h);
+			}
+		}
+		if (upcase(c->url[0]) != 'P') add_to_str(&hdr, &l, "/");
 		if (!post) add_to_str(&hdr, &l, u);
 		else add_bytes_to_str(&hdr, &l, u, post - u - 1);
 		add_to_str(&hdr, &l, "\r\n");
diff -ru links-0.96/intl/czech.lng links-0.96+true-referer/intl/czech.lng
--- links-0.96/intl/czech.lng	Mon Jul  2 02:28:05 2001
+++ links-0.96+true-referer/intl/czech.lng	Sat Oct  6 17:13:57 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Nemù¾u zjistit stav socketu",
 T_BAD_HTTP_RESPONSE, "©patná HTTP odpovìï (asi bugovitý server)",
 T_HTTP_100, "HTTP 100 (?)",
+T_FAKE_REFERER, "Fale¹ný HTTP referer",
+T_REFERER_NONE, "Neposílat HTTP referer",
+T_REFERER_TRUE, "Posílat pøedchozí URL jako referer (normalní a NEBEZPEÈNÉ)",
+T_REFERER_SAME_URL, "Posílat vy¾ádané URL jako referer",
+T_REFERER_FAKE, "Posílat fale¹ný HTTP referer",
 T_NO_CONTENT, "®ádnej obsah",
 T_UNKNOWN_FILE_TYPE, "Neznámej typ souboru",
 T_ERROR_OPENING_FILE, "Chybièka pøi ètení souboru",
diff -ru links-0.96/intl/english.lng links-0.96+true-referer/intl/english.lng
--- links-0.96/intl/english.lng	Sat Oct  6 17:16:08 2001
+++ links-0.96+true-referer/intl/english.lng	Sat Oct  6 17:13:57 2001
@@ -140,6 +140,7 @@
 T_HTTP_100, "HTTP 100 (???)",
 T_FAKE_REFERER, "Fixed HTTP Referer",
 T_REFERER_NONE, "No referer",
+T_REFERER_TRUE, "Send previous URL as referer (normal operation, INSECURE)",
 T_REFERER_SAME_URL, "Send requested URL as referer",
 T_REFERER_FAKE, "Fixed referer",
 T_NO_CONTENT, "No content",
diff -ru links-0.96/links.h links-0.96+true-referer/links.h
--- links-0.96/links.h	Sat Oct  6 17:16:08 2001
+++ links-0.96+true-referer/links.h	Sat Oct  6 17:13:57 2001
@@ -632,6 +632,7 @@
 	struct connection *prev;
 	tcount count;
 	unsigned char *url;
+	unsigned char *prev_url;
 	int running;
 	int state;
 	int prev_error;
@@ -754,7 +755,7 @@
 void retry_connection(struct connection *c);
 void abort_connection(struct connection *c);
 void end_connection(struct connection *c);
-int load_url(unsigned char *, struct status *, int, int);
+int load_url(unsigned char *, unsigned char *, struct status *, int, int);
 void change_connection(struct status *, struct status *, int);
 void detach_connection(struct status *, int);
 void abort_all_connections();
@@ -1466,6 +1467,7 @@
 	unsigned char *tq_prog;
 	int tq_prog_flags;
 	unsigned char *dn_url;
+	unsigned char *ref_url;
 	unsigned char *search_word;
 	unsigned char *last_search_word;
 	int search_direction;
@@ -1991,6 +1993,7 @@
 #define REFERER_NONE 0
 #define REFERER_SAME_URL 1
 #define REFERER_FAKE 2
+#define REFERER_TRUE 3
 
 extern unsigned char http_proxy[];
 extern unsigned char ftp_proxy[];
diff -ru links-0.96/main.c links-0.96+true-referer/main.c
--- links-0.96/main.c	Sun Apr  8 22:46:06 2001
+++ links-0.96+true-referer/main.c	Sat Oct  6 17:13:57 2001
@@ -163,7 +163,7 @@
 		if (stat->state >= 0) change_connection(stat, NULL, PRI_CANCEL);
 		u = stracpy(ce->redirect);
 		if (!http_bugs.bug_302_redirect) if (!ce->redirect_get && (p = strchr(ce->url, POST_CHAR))) add_to_strn(&u, p);
-		load_url(u, stat, PRI_MAIN, 0);
+		load_url(u, ce->url, stat, PRI_MAIN, 0);
 		mem_free(u);
 		return;
 	}
@@ -280,7 +280,7 @@
 		dump_stat.end = end_dump;
 		dump_pos = 0;
 		if (!(uu = translate_url(u, wd = get_cwd()))) uu = stracpy(u);
-		if (load_url(uu, &dump_stat, PRI_MAIN, 0)) goto ttt;
+		if (load_url(uu, NULL, &dump_stat, PRI_MAIN, 0)) goto ttt;
 		mem_free(uu);
 		if (wd) mem_free(wd);
 	}
diff -ru links-0.96/menu.c links-0.96+true-referer/menu.c
--- links-0.96/menu.c	Sat Oct  6 17:16:08 2001
+++ links-0.96+true-referer/menu.c	Sat Oct  6 17:13:57 2001
@@ -438,7 +438,7 @@
  	do_dialog(term, d, getml(d, NULL));
 }
 
-unsigned char *http_labels[] = { TEXT(T_USE_HTTP_10), TEXT(T_ALLOW_SERVER_BLACKLIST), TEXT(T_BROKEN_302_REDIRECT), TEXT(T_NO_KEEPALIVE_AFTER_POST_REQUEST), TEXT(T_REFERER_NONE), TEXT(T_REFERER_SAME_URL), TEXT(T_REFERER_FAKE), TEXT(T_FAKE_REFERER) };
+unsigned char *http_labels[] = { TEXT(T_USE_HTTP_10), TEXT(T_ALLOW_SERVER_BLACKLIST), TEXT(T_BROKEN_302_REDIRECT), TEXT(T_NO_KEEPALIVE_AFTER_POST_REQUEST), TEXT(T_REFERER_NONE), TEXT(T_REFERER_TRUE), TEXT(T_REFERER_SAME_URL), TEXT(T_REFERER_FAKE), TEXT(T_FAKE_REFERER) };
 
 void httpopt_fn(struct dialog_data *dlg)
 {
@@ -448,8 +448,8 @@
 	int y = 0;
 	checkboxes_width(term, dlg->dlg->udata, &max, max_text_width);
 	checkboxes_width(term, dlg->dlg->udata, &min, min_text_width);
-	max_text_width(term, http_labels[7], &max);
-	min_text_width(term, http_labels[7], &min);
+	max_text_width(term, http_labels[8], &max);
+	min_text_width(term, http_labels[8], &min);
 	max_buttons_width(term, dlg->items + dlg->n - 2, 2, &max);
 	min_buttons_width(term, dlg->items + dlg->n - 2, 2, &min);
 	w = term->x * 9 / 10 - 2 * DIALOG_LB;
@@ -460,7 +460,7 @@
 	rw = 0;
 	dlg_format_checkboxes(NULL, term, dlg->items, dlg->n - 3, 0, &y, w, &rw, dlg->dlg->udata);
 	y++;
-	dlg_format_text(NULL, term, http_labels[7], 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
+	dlg_format_text(NULL, term, http_labels[8], 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
 	y+=2;
 	dlg_format_buttons(NULL, term, dlg->items + dlg->n - 2, 2, 0, &y, w, &rw, AL_CENTER);
 	w = rw;
@@ -471,8 +471,8 @@
 	y = dlg->y + DIALOG_TB + 1;
 	dlg_format_checkboxes(term, term, dlg->items, dlg->n - 3, dlg->x + DIALOG_LB, &y, w, NULL, dlg->dlg->udata);
 	y++;
-	dlg_format_text(term, term, http_labels[7], dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
-	dlg_format_field(term, term, dlg->items + 7, dlg->x + DIALOG_LB, &y, w, NULL, AL_LEFT);
+	dlg_format_text(term, term, http_labels[8], dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
+	dlg_format_field(term, term, dlg->items + 8, dlg->x + DIALOG_LB, &y, w, NULL, AL_LEFT);
 	y++;
 	dlg_format_buttons(term, term, dlg->items + dlg->n - 2, 2, dlg->x + DIALOG_LB, &y, w, &rw, AL_CENTER);
 }
@@ -482,8 +482,8 @@
 {
 	struct http_bugs *bugs = (struct http_bugs *)di->cdata;
 	struct dialog *d;
-	if (!(d = mem_alloc(sizeof(struct dialog) + 11 * sizeof(struct dialog_item)))) return 0;
-	memset(d, 0, sizeof(struct dialog) + 11 * sizeof(struct dialog_item));
+	if (!(d = mem_alloc(sizeof(struct dialog) + 12 * sizeof(struct dialog_item)))) return 0;
+	memset(d, 0, sizeof(struct dialog) + 12 * sizeof(struct dialog_item));
 	d->title = TEXT(T_HTTP_BUG_WORKAROUNDS);
 	d->fn = httpopt_fn;
 	d->udata = http_labels;
@@ -510,26 +510,31 @@
 	d->items[4].data = (void *)&referer;
 	d->items[5].type = D_CHECKBOX;
 	d->items[5].gid = 1;
-	d->items[5].gnum = REFERER_SAME_URL;
+	d->items[5].gnum = REFERER_TRUE;
 	d->items[5].dlen = sizeof(int);
 	d->items[5].data = (void *)&referer;
 	d->items[6].type = D_CHECKBOX;
 	d->items[6].gid = 1;
-	d->items[6].gnum = REFERER_FAKE;
+	d->items[6].gnum = REFERER_SAME_URL;
 	d->items[6].dlen = sizeof(int);
 	d->items[6].data = (void *)&referer;
-	d->items[7].type = D_FIELD;
-	d->items[7].dlen = MAX_STR_LEN;
-	d->items[7].data = fake_referer;
-	d->items[8].type = D_BUTTON;
-	d->items[8].gid = B_ENTER;
-	d->items[8].fn = ok_dialog;
-	d->items[8].text = TEXT(T_OK);
+	d->items[7].type = D_CHECKBOX;
+	d->items[7].gid = 1;
+	d->items[7].gnum = REFERER_FAKE;
+	d->items[7].dlen = sizeof(int);
+	d->items[7].data = (void *)&referer;
+	d->items[8].type = D_FIELD;
+	d->items[8].dlen = MAX_STR_LEN;
+	d->items[8].data = fake_referer;
 	d->items[9].type = D_BUTTON;
-	d->items[9].gid = B_ESC;
-	d->items[9].fn = cancel_dialog;
-	d->items[9].text = TEXT(T_CANCEL);
-	d->items[10].type = D_END;
+	d->items[9].gid = B_ENTER;
+	d->items[9].fn = ok_dialog;
+	d->items[9].text = TEXT(T_OK);
+	d->items[10].type = D_BUTTON;
+	d->items[10].gid = B_ESC;
+	d->items[10].fn = cancel_dialog;
+	d->items[10].text = TEXT(T_CANCEL);
+	d->items[11].type = D_END;
  	do_dialog(dlg->win->term, d, getml(d, NULL));
 	return 0;
 }
diff -ru links-0.96/sched.c links-0.96+true-referer/sched.c
--- links-0.96/sched.c	Mon Jun 11 12:04:54 2001
+++ links-0.96+true-referer/sched.c	Sat Oct  6 17:13:57 2001
@@ -527,7 +527,7 @@
 	return u;
 }
 
-int load_url(unsigned char *url, struct status *stat, int pri, int no_cache)
+int load_url(unsigned char *url, unsigned char *prev_url, struct status *stat, int pri, int no_cache)
 {
 	struct cache_entry *e = NULL;
 	struct connection *c;
@@ -587,6 +587,7 @@
 	memset(c, 0, sizeof(struct connection));
 	c->count = connection_count++;
 	c->url = u;
+	c->prev_url = prev_url;
 	c->running = 0;
 	c->prev_error = 0;
 	c->from = no_cache >= NC_RELOAD || !e || e->frag.next == &e->frag || ((struct fragment *)e->frag.next)->offset ? 0 : ((struct fragment *)e->frag.next)->length;
diff -ru links-0.96/session.c links-0.96+true-referer/session.c
--- links-0.96/session.c	Sat Jun  2 00:39:00 2001
+++ links-0.96+true-referer/session.c	Sat Oct  6 17:15:00 2001
@@ -518,7 +518,7 @@
 			down->win->handler(down->win, &ev, 0);
 		}
 		/*if (!strchr(down->url, POST_CHAR)) {*/
-			load_url(down->url, &down->stat, PRI_DOWNLOAD, NC_CACHE);
+			load_url(down->url, ce->url, &down->stat, PRI_DOWNLOAD, NC_CACHE);
 			return;
 		/*} else {
 			unsigned char *msg = init_str();
@@ -676,7 +676,7 @@
 	down->ses = ses;
 	down->remotetime = 0;
 	add_to_list(downloads, down);
-	load_url(url, &down->stat, PRI_DOWNLOAD, NC_CACHE);
+	load_url(url, ses->ref_url, &down->stat, PRI_DOWNLOAD, NC_CACHE);
 	display_download(ses->term, down, ses);
 }
 
@@ -849,7 +849,7 @@
 	w->ses->loading_url = stracpy(w->url);
 	w->ses->wtd = w->wtd;
 	w->ses->wtd_target = w->target;
-	load_url(w->ses->loading_url, &w->ses->loading, w->pri, w->cache);
+	load_url(w->ses->loading_url, w->ses->ref_url, &w->ses->loading, w->pri, w->cache);
 }
 
 void post_no(struct wtd_data *w)
@@ -876,7 +876,7 @@
 		ses->loading_url = url;
 		ses->wtd = wtd;
 		ses->wtd_target = target;
-		load_url(url, &ses->loading, pri, cache);
+		load_url(url, ses->ref_url, &ses->loading, pri, cache);
 		return;
 	}
 	w->ses = ses;
@@ -897,6 +897,7 @@
 int do_move(struct session *ses, struct status **stat)
 {
 	struct cache_entry *ce = NULL;
+	int l = 0;
 	if (!ses->loading_url) {
 		internal("no ses->loading_url");
 		return 0;
@@ -917,6 +918,9 @@
 		abort_loading(ses);
 		if (!list_empty(ses->history)) *stat = &cur_loc(ses)->stat;
 		else *stat = NULL;
+		if (ses->ref_url) mem_free(ses->ref_url);
+		ses->ref_url = init_str();
+		add_to_str(&ses->ref_url, &l, ce->url);
 		if (w == WTD_FORWARD || w == WTD_IMGMAP) {
 			ses_goto(ses, u, ses->wtd_target, PRI_MAIN, NC_CACHE, w, gp, end_load, 1);
 			return 2;
@@ -1144,6 +1148,7 @@
 {
 	static int stop_recursion = 0;
 	struct file_to_load *ftl;
+	struct f_data_c *fd = current_frame(ses);
 	int more;
 	if (stop_recursion) return;
 	stop_recursion = 1;
@@ -1151,7 +1156,7 @@
 		more = 0;
 		foreach(ftl, ses->more_files) if (!ftl->req_sent) {
 			ftl->req_sent = 1;
-			load_url(ftl->url, &ftl->stat, ftl->pri, NC_CACHE);
+			load_url(ftl->url, fd?fd->f_data?fd->f_data->url:NULL:NULL, &ftl->stat, ftl->pri, NC_CACHE);
 			more = 1;
 		}
 	} while (more);
@@ -1342,6 +1347,7 @@
 	if (ses->tq_goto_position) mem_free(ses->tq_goto_position);
 	if (ses->tq_prog) mem_free(ses->tq_prog);
 	if (ses->dn_url) mem_free(ses->dn_url);
+	if (ses->ref_url) mem_free(ses->ref_url),ses->ref_url=NULL;
 	if (ses->search_word) mem_free(ses->search_word);
 	if (ses->last_search_word) mem_free(ses->last_search_word);
 	del_from_list(ses);
@@ -1361,6 +1367,7 @@
 void reload(struct session *ses, int no_cache)
 {
 	struct location *l;
+	struct f_data_c *fd = current_frame(ses);
 	abort_loading(ses);
 	if (no_cache == -1) no_cache = ++ses->reloadlevel;
 	else ses->reloadlevel = no_cache;
@@ -1368,12 +1375,12 @@
 		struct file_to_load *ftl;
 		l->stat.data = ses;
 		l->stat.end = (void *)doc_end_load;
-		load_url(l->vs.url, &l->stat, PRI_MAIN, no_cache);
+		load_url(l->vs.url, ses->ref_url, &l->stat, PRI_MAIN, no_cache);
 		foreach(ftl, ses->more_files) {
 			if (ftl->req_sent && ftl->stat.state >= 0) continue;
 			ftl->stat.data = ftl;
 			ftl->stat.end = (void *)file_end_load;
-			load_url(ftl->url, &ftl->stat, PRI_FRAME, no_cache);
+			load_url(ftl->url, fd?fd->f_data?fd->f_data->url:NULL:NULL, &ftl->stat, PRI_FRAME, no_cache);
 		}
 	}
 }
@@ -1396,6 +1403,9 @@
 void go_back(struct session *ses)
 {
 	unsigned char *url;
+	struct f_data_c *fd = current_frame(ses);
+	int l = 0;
+	
 	ses->reloadlevel = NC_CACHE;
 	if (ses->wtd) {
 		if (1 || ses->wtd != WTD_BACK) {
@@ -1410,6 +1420,11 @@
 	abort_loading(ses);
 	if (!(url = stracpy(((struct location *)ses->history.next)->next->vs.url)))
 		return;
+	if (ses->ref_url) mem_free(ses->ref_url),ses->ref_url=NULL;
+	if (fd && fd->f_data && fd->f_data->url) {
+		ses->ref_url = init_str();
+		add_to_str(&ses->ref_url, &l, fd->f_data->url);
+	}
 	ses_goto(ses, url, NULL, PRI_MAIN, NC_ALWAYS_CACHE, WTD_BACK, NULL, end_load, 0);
 }
 
@@ -1418,6 +1433,9 @@
 	unsigned char *u;
 	unsigned char *pos;
 	void (*fn)(struct session *, unsigned char *);
+        struct f_data_c *fd = current_frame(ses);
+        int l = 0;
+
 	if ((fn = get_external_protocol_function(url))) {
 		fn(ses, url);
 		return;
@@ -1439,6 +1457,11 @@
 		}
 	}
 	abort_loading(ses);
+	if (ses->ref_url) mem_free(ses->ref_url), ses->ref_url=NULL;
+	if (fd && fd->f_data && fd->f_data->url) {
+ 		ses->ref_url = init_str();
+		add_to_str(&ses->ref_url, &l, fd->f_data->url);
+	}
 	ses_goto(ses, u, target, PRI_MAIN, NC_CACHE, wtd, pos, end_load, 0);
 	/*abort_loading(ses);*/
 }
diff -ru links-0.96/view.c links-0.96+true-referer/view.c
--- links-0.96/view.c	Sat Jun 16 13:34:07 2001
+++ links-0.96+true-referer/view.c	Sat Oct  6 17:13:57 2001
@@ -2086,6 +2086,8 @@
 void frm_download(struct session *ses, struct f_data_c *fd)
 {
 	struct link *link;
+	int l = 0;
+	
 	if (fd->vs->current_link == -1) return;
 	if (ses->dn_url) mem_free(ses->dn_url), ses->dn_url = NULL;
 	link = &fd->f_data->links[fd->vs->current_link];
@@ -2096,6 +2098,9 @@
 			ses->dn_url = NULL;
 			return;
 		}
+		if (ses->ref_url) mem_free(ses->ref_url);
+		ses->ref_url = init_str();
+		add_to_str(&ses->ref_url, &l, fd->f_data->url);
 		query_file(ses, ses->dn_url, start_download, NULL);
 	}
 }
@@ -2103,21 +2108,33 @@
 void send_download_image(struct terminal *term, void *xxx, struct session *ses)
 {
 	struct f_data_c *fd = current_frame(ses);
+	int l = 0;
+	
 	if (!fd) return;
 	if (fd->vs->current_link == -1) return;
 	if (ses->dn_url) mem_free(ses->dn_url);
-	if ((ses->dn_url = stracpy(fd->f_data->links[fd->vs->current_link].where_img)))
+	if ((ses->dn_url = stracpy(fd->f_data->links[fd->vs->current_link].where_img))) {
+		if (ses->ref_url) mem_free(ses->ref_url);
+		ses->ref_url = init_str();
+		add_to_str(&ses->ref_url, &l, fd->f_data->url);
 		query_file(ses, ses->dn_url, start_download, NULL);
+	}
 }
 
 void send_download(struct terminal *term, void *xxx, struct session *ses)
 {
 	struct f_data_c *fd = current_frame(ses);
+	int l = 0;
+	
 	if (!fd) return;
 	if (fd->vs->current_link == -1) return;
 	if (ses->dn_url) mem_free(ses->dn_url);
-	if ((ses->dn_url = get_link_url(ses, fd, &fd->f_data->links[fd->vs->current_link])))
+	if ((ses->dn_url = get_link_url(ses, fd, &fd->f_data->links[fd->vs->current_link]))) {
+		if (ses->ref_url) mem_free(ses->ref_url);
+		ses->ref_url = init_str();
+		add_to_str(&ses->ref_url, &l, fd->f_data->url);
 		query_file(ses, ses->dn_url, start_download, NULL);
+	}
 }
 
 /* open a link in a new xterm */
@@ -2180,14 +2197,20 @@
 
 void save_url(struct session *ses, unsigned char *url)
 {
+	struct f_data_c *fd = current_frame(ses);
 	unsigned char *u;
+	int l = 0;
+	
 	if (!(u = translate_url(url, ses->term->cwd))) {
 		struct status stat = { NULL, NULL, NULL, NULL, S_BAD_URL, PRI_CANCEL, 0, NULL, NULL };
 		print_error_dialog(ses, &stat, TEXT(T_ERROR));
 		return;
 	}
 	if (ses->dn_url) mem_free(ses->dn_url);
+	if (ses->ref_url) mem_free(ses->ref_url);
 	ses->dn_url = u;
+	ses->ref_url = init_str();
+	add_to_str(&ses->ref_url, &l, fd->f_data->url);
 	query_file(ses, ses->dn_url, start_download, NULL);
 }
 
@@ -2203,12 +2226,19 @@
 
 void save_as(struct terminal *term, void *xxx, struct session *ses)
 {
+	struct f_data_c *fd = current_frame(ses);
 	struct location *l;
+	int len = 0;
+	
 	if (list_empty(ses->history)) return;
 	l = cur_loc(ses);
 	if (ses->dn_url) mem_free(ses->dn_url);
-	if ((ses->dn_url = stracpy(l->vs.url)))
+	if ((ses->dn_url = stracpy(l->vs.url))) {
+		if (ses->ref_url) mem_free(ses->ref_url);
+		ses->ref_url = init_str();
+		add_to_str(&ses->ref_url, &len, fd->f_data->url);
 		query_file(ses, ses->dn_url, start_download, NULL);
+	}
 }
 
 void save_formatted(struct session *ses, unsigned char *file)
diff -ru links-0.96/links.1 links-0.96+true-referer/links.1
--- links-0.96/links.1	Sat Oct  6 17:41:14 2001
+++ links-0.96+true-referer/links.1	Sat Oct  6 17:40:30 2001
@@ -67,6 +67,10 @@
 Write a plain-text version of the given HTML document to stdout.
 
 .TP
+\f3-fake-referer \f2<referer>\f1
+Send always this HTTP referer. Has a mean only with \f3-http-referer \f23\f1.
+
+.TP
 \f3-format-cache-size \f2<num>\f1
 Number of formatted document pages cached.
 (default: 5)
@@ -106,6 +110,11 @@
 \f3-http-proxy \f2<host:port>\f1
 Host and port number of the HTTP proxy, or blank.
 (default: blank)
+
+.TP
+\f3-http-referer \f2<0>/<1>/<2>/<3>\f1
+Turn sending of HTTP referer. Either never(0), true(1), same URL(2) or fake(3).
+(default: none)
 
 .TP
 \f3-language \f2<langname>\f1
diff -ru links-0.96/intl/brazilian_portuguese.lng links-0.96+true-referer/intl/brazilian_portuguese.lng
--- links-0.96/intl/brazilian_portuguese.lng	Mon Jul  2 02:28:05 2001
+++ links-0.96+true-referer/intl/brazilian_portuguese.lng	Sat Oct  6 18:20:45 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Não posso obter o status do socket",
 T_BAD_HTTP_RESPONSE, "Resposta HTTP incorreta",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Sem conteúdo",
 T_UNKNOWN_FILE_TYPE, "Tipo de arquivo desconhecido",
 T_ERROR_OPENING_FILE, "Erro ao abrir arquivo",
diff -ru links-0.96/intl/bulgarian.lng links-0.96+true-referer/intl/bulgarian.lng
--- links-0.96/intl/bulgarian.lng	Mon Jul  2 02:28:05 2001
+++ links-0.96+true-referer/intl/bulgarian.lng	Sat Oct  6 18:20:45 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Íå ìîæå äà ñå ïîëó÷è ñúñòîÿíèåòî íà socket-à",
 T_BAD_HTTP_RESPONSE, "Íåâàëèäåí HTTP îòãîâîð",
 T_HTTP_100, NULL,
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Íÿìà äàííè",
 T_UNKNOWN_FILE_TYPE, "Íåèçâåñòåí òèï ôàéë",
 T_ERROR_OPENING_FILE, "Ãðåøêà ïðè îòâàðÿíåòî íà ôàéë",
diff -ru links-0.96/intl/estonian.lng links-0.96+true-referer/intl/estonian.lng
--- links-0.96/intl/estonian.lng	Mon Jul  2 02:28:06 2001
+++ links-0.96+true-referer/intl/estonian.lng	Sat Oct  6 18:20:45 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Ei saa kätte sokli staatust",
 T_BAD_HTTP_RESPONSE, "Vigane HTTP vastus",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Sisu puudub",
 T_UNKNOWN_FILE_TYPE, "Tundmatu failitüüp",
 T_ERROR_OPENING_FILE, "Viga faili avamisel",
diff -ru links-0.96/intl/french.lng links-0.96+true-referer/intl/french.lng
--- links-0.96/intl/french.lng	Mon Jul  2 02:28:06 2001
+++ links-0.96+true-referer/intl/french.lng	Sat Oct  6 18:20:45 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "impossible d'obtenir l'état du socket",
 T_BAD_HTTP_RESPONSE, "Réponse HTTP incorrecte",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Pas de contenu",
 T_UNKNOWN_FILE_TYPE, "Type de fichier inconnu",
 T_ERROR_OPENING_FILE, "Erreur lors de l'ouverture du fichier",
diff -ru links-0.96/intl/galician.lng links-0.96+true-referer/intl/galician.lng
--- links-0.96/intl/galician.lng	Mon Jul  2 02:28:06 2001
+++ links-0.96+true-referer/intl/galician.lng	Sat Oct  6 18:20:45 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Non se puido saber o estado do socket",
 T_BAD_HTTP_RESPONSE, "Resposta HTTP incorrecta",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Non hai contido",
 T_UNKNOWN_FILE_TYPE, "Tipo de ficheiro descoñecido",
 T_ERROR_OPENING_FILE, "Erro abrindo ficheiro",
diff -ru links-0.96/intl/german.lng links-0.96+true-referer/intl/german.lng
--- links-0.96/intl/german.lng	Mon Jul  2 02:28:07 2001
+++ links-0.96+true-referer/intl/german.lng	Sat Oct  6 18:20:45 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "kann Socket-Status nicht abfragen",
 T_BAD_HTTP_RESPONSE, "fehlerhafte HTTP-Antwort",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Kein Inhalt",
 T_UNKNOWN_FILE_TYPE, "Unbekannter Dateityp",
 T_ERROR_OPENING_FILE, "Fehler bei Datei-Öffnung",
diff -ru links-0.96/intl/greek.lng links-0.96+true-referer/intl/greek.lng
--- links-0.96/intl/greek.lng	Mon Jul  2 02:28:07 2001
+++ links-0.96+true-referer/intl/greek.lng	Sat Oct  6 18:20:45 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Áäýíáôç ç ëÞøç êáôÜóôáóçò õðïäï÷Ýá",
 T_BAD_HTTP_RESPONSE, "Ìç Ýãêõñç áðÜíôçóç HTTP",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Äåí õðÜñ÷åé ðåñéå÷üìåíï",
 T_UNKNOWN_FILE_TYPE, "¶ãíùóôï åßäïò áñ÷åßïõ",
 T_ERROR_OPENING_FILE, "Error opening file",
diff -ru links-0.96/intl/hungarian.lng links-0.96+true-referer/intl/hungarian.lng
--- links-0.96/intl/hungarian.lng	Mon Jul  2 02:28:07 2001
+++ links-0.96+true-referer/intl/hungarian.lng	Sat Oct  6 18:20:46 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Nem lehet a csatorna állapotát megállapítani",
 T_BAD_HTTP_RESPONSE, "Hibás HTTP válasz",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "A lap üres",
 T_UNKNOWN_FILE_TYPE, "Ismeretlen fájlformátum",
 T_ERROR_OPENING_FILE, "Hiba a fájl megnyitásakor",
diff -ru links-0.96/intl/icelandic.lng links-0.96+true-referer/intl/icelandic.lng
--- links-0.96/intl/icelandic.lng	Mon Jul  2 02:28:08 2001
+++ links-0.96+true-referer/intl/icelandic.lng	Sat Oct  6 18:20:46 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Finn ekki stöðu gáttar",
 T_BAD_HTTP_RESPONSE, "Ógilt HTTP svar",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Ekkert efni",
 T_UNKNOWN_FILE_TYPE, "Óþekkt skráartegund",
 T_ERROR_OPENING_FILE, "Villa við opnun skráar",
diff -ru links-0.96/intl/italian.lng links-0.96+true-referer/intl/italian.lng
--- links-0.96/intl/italian.lng	Mon Jul  2 02:28:08 2001
+++ links-0.96+true-referer/intl/italian.lng	Sat Oct  6 18:20:46 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Non posso prendere lo stato della socket",
 T_BAD_HTTP_RESPONSE, "Risposta HTTP errata",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Nessun contenuto",
 T_UNKNOWN_FILE_TYPE, "Tipo file sconosciuto",
 T_ERROR_OPENING_FILE, "Errore nell'apertura del file",
diff -ru links-0.96/intl/lithuanian.lng links-0.96+true-referer/intl/lithuanian.lng
--- links-0.96/intl/lithuanian.lng	Mon Jul  2 02:28:08 2001
+++ links-0.96+true-referer/intl/lithuanian.lng	Sat Oct  6 18:20:46 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Negaunu soket'o bûsenos",
 T_BAD_HTTP_RESPONSE, "Blogas HTTP atsakymas",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Nëra turinio",
 T_UNKNOWN_FILE_TYPE, "Neþinomas failo tipas",
 T_ERROR_OPENING_FILE, "Klaida bandant atidaryti failà",
diff -ru links-0.96/intl/polish.lng links-0.96+true-referer/intl/polish.lng
--- links-0.96/intl/polish.lng	Mon Jul  2 02:28:08 2001
+++ links-0.96+true-referer/intl/polish.lng	Sat Oct  6 18:20:46 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Nie mo¿na zbadaæ stanu gniazda",
 T_BAD_HTTP_RESPONSE, "Nieprawid³owa odpowied¼ HTTP",
 T_HTTP_100, NULL,
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Plik pusty",
 T_UNKNOWN_FILE_TYPE, "Nieznay typ pliku",
 T_ERROR_OPENING_FILE, "B³±d przy otwieraniu pliku",
diff -ru links-0.96/intl/russian.lng links-0.96+true-referer/intl/russian.lng
--- links-0.96/intl/russian.lng	Mon Jul  2 02:28:09 2001
+++ links-0.96+true-referer/intl/russian.lng	Sat Oct  6 18:20:46 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "îÅÌØÚÑ ÐÏÌÕÞÉÔØ ÓÏÓÔÏÑÎÉÅ ÓÏËÅÔÁ",
 T_BAD_HTTP_RESPONSE, "îÅ×ÅÒÎÙÊ ÏÔ×ÅÔ HTTP",
 T_HTTP_100, NULL,
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "îÅÔ ÄÁÎÎÙÈ",
 T_UNKNOWN_FILE_TYPE, "îÅÉÚ×ÅÓÔÎÙÊ ÔÉÐ ÆÁÊÌÁ",
 T_ERROR_OPENING_FILE, "ïÛÉÂËÁ ÏÔËÒÙÔÉÑ ÆÁÊÌÁ",
diff -ru links-0.96/intl/slovak.lng links-0.96+true-referer/intl/slovak.lng
--- links-0.96/intl/slovak.lng	Mon Jul  2 02:28:09 2001
+++ links-0.96+true-referer/intl/slovak.lng	Sat Oct  6 18:20:46 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Nemô¾em zisti» stav socketu",
 T_BAD_HTTP_RESPONSE, "Zlá HTTP odpoveï (asi bugovitý server)",
 T_HTTP_100, "HTTP 100 (?)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "®iadny obsah",
 T_UNKNOWN_FILE_TYPE, "Neznámy typ súboru",
 T_ERROR_OPENING_FILE, "Chyba pri èítaní súboru",
diff -ru links-0.96/intl/spanish.lng links-0.96+true-referer/intl/spanish.lng
--- links-0.96/intl/spanish.lng	Mon Jul  2 02:28:09 2001
+++ links-0.96+true-referer/intl/spanish.lng	Sat Oct  6 18:20:46 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "No puedo saber el estado del socket",
 T_BAD_HTTP_RESPONSE, "Respuesta HTTP incorrecta",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Sin contenido",
 T_UNKNOWN_FILE_TYPE, "Tipo de fichero desconocido",
 T_ERROR_OPENING_FILE, "Error abriendo fichero",
diff -ru links-0.96/intl/swedish.lng links-0.96+true-referer/intl/swedish.lng
--- links-0.96/intl/swedish.lng	Mon Jul  2 02:28:10 2001
+++ links-0.96+true-referer/intl/swedish.lng	Sat Oct  6 18:20:47 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Kan inte se sockettillstånd",
 T_BAD_HTTP_RESPONSE, "Felaktigt HTTP-svar",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Inget innehåll",
 T_UNKNOWN_FILE_TYPE, "Okänd filtyp",
 T_ERROR_OPENING_FILE, "Fel vid öppnande av fil",
diff -ru links-0.96/intl/turkish.lng links-0.96+true-referer/intl/turkish.lng
--- links-0.96/intl/turkish.lng	Mon Jul  2 02:28:10 2001
+++ links-0.96+true-referer/intl/turkish.lng	Sat Oct  6 18:20:47 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "Soket durumu alýnamýyor",
 T_BAD_HTTP_RESPONSE, "Hatalý HTTP cevabý",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "Ýçerik YOK",
 T_UNKNOWN_FILE_TYPE, "Bilinmeyen dosya türü",
 T_ERROR_OPENING_FILE, "Dosya açýlýrken hata",
diff -ru links-0.96/intl/ukrainian.lng links-0.96+true-referer/intl/ukrainian.lng
--- links-0.96/intl/ukrainian.lng	Mon Jul  2 02:28:10 2001
+++ links-0.96+true-referer/intl/ukrainian.lng	Sat Oct  6 18:20:47 2001
@@ -138,6 +138,11 @@
 T_CANT_GET_SOCKET_STATE, "îÅÍÏÖÌÉ×Ï ÏÔÒÉÍÁÔÉ ÓÔÁÎ ÓÏËÅÔÕ",
 T_BAD_HTTP_RESPONSE, "îÅÐÒÁ×ÉÌØÎÁ ×¦ÄÐÏ×¦ÄØ HTTP",
 T_HTTP_100, "HTTP 100 (???)",
+T_FAKE_REFERER, NULL,
+T_REFERER_NONE, NULL,
+T_REFERER_TRUE, NULL,
+T_REFERER_SAME_URL, NULL,
+T_REFERER_FAKE, NULL,
 T_NO_CONTENT, "îÅÍÁ ¦ÎÆÏÒÍÁÃ¦§",
 T_UNKNOWN_FILE_TYPE, "îÅ×¦ÄÏÍÉÊ ÔÉÐ ÆÁÊÌÕ",
 T_ERROR_OPENING_FILE, "ðÏÍÉÌËÁ ×¦ÄËÒÉÔÔÑ ÆÁÊÌÕ",
Only in links-0.96+true-referer/: intl-bak
diff -ru links-0.96/language.h links-0.96+true-referer/language.h
--- links-0.96/language.h	Mon Jul  2 02:28:15 2001
+++ links-0.96+true-referer/language.h	Sat Oct  6 18:20:48 2001
@@ -142,227 +142,232 @@
 #define T_CANT_GET_SOCKET_STATE    138	
 #define T_BAD_HTTP_RESPONSE    139	
 #define T_HTTP_100    140	
-#define T_NO_CONTENT    141	
-#define T_UNKNOWN_FILE_TYPE    142	
-#define T_ERROR_OPENING_FILE    143	
-#define T_BAD_FTP_RESPONSE    144	
-#define T_FTP_SERVICE_UNAVAILABLE    145	
-#define T_BAD_FTP_LOGIN    146	
-#define T_FTP_PORT_COMMAND_FAILED    147	
-#define T_FILE_NOT_FOUND    148	
-#define T_FTP_FILE_ERROR    149	
-#define T_UNKNOWN_ERROR    150	
-#define T_RECEIVED    151	
-#define T_OF    152	
-#define T_AVG    153	
-#define T_CUR    154	
-#define T_AVERAGE_SPEED    155	
-#define T_SPEED    156	
-#define T_CURRENT_SPEED    157	
-#define T_ELAPSED_TIME    158	
-#define T_ESTIMATED_TIME    159	
-#define T_BACKGROUND    160	
-#define T_ABORT    161	
-#define T_YES    162	
-#define T_NO    163	
-#define T_DOWNLOAD_ERROR    164	
-#define T_COULD_NOT_WRITE_TO_FILE    165	
-#define T_ERROR_DOWNLOADING    166	
-#define T_COULD_NOT_CREATE_FILE    167	
-#define T_UNKNOWN_TYPE    168	
-#define T_CONTEN_TYPE_IS    169	
-#define T_DO_YOU_WANT_TO_SAVE_OR_DISLPAY_THIS_FILE    170	
-#define T_SAVE    171	
-#define T_DISPLAY    172	
-#define T_WHAT_TO_DO    173	
-#define T_DO_YOU_WANT_TO_OPEN_FILE_WITH    174	
-#define T_SAVE_IT_OR_DISPLAY_IT    175	
-#define T_OPEN    176	
-#define T_DO_YOU_WANT_TO_FOLLOW_REDIRECT_AND_POST_FORM_DATA_TO_URL    177	
-#define T_DO_YOU_WANT_TO_POST_FORM_DATA_TO_URL    178	
-#define T_DO_YOU_WANT_TO_REPOST_FORM_DATA_TO_URL    179	
-#define T_WARNING    180	
-#define T_ERROR    181	
-#define T_WELCOME    182	
-#define T_WELCOME_TO_LINKS    183	
-#define T_BASIC_HELP    184	
-#define T_LABEL    185	
-#define T_CONTENT_TYPES    186	
-#define T_PROGRAM__IS_REPLACED_WITH_FILE_NAME    187	
-#define T_BLOCK_TERMINAL_WHILE_PROGRAM_RUNNING    188	
-#define T_RUN_ON_TERMINAL    189	
-#define T_RUN_IN_XWINDOW    190	
-#define T_ASK_BEFORE_OPENING    191	
-#define T_DELETE_ASSOCIATION    192	
-#define T_ASSOCIATION    193	
-#define T_EXTENSION_S    194	
-#define T_CONTENT_TYPE    195	
-#define T_NO_ASSOCIATIONS    196	
-#define T_DELETE_EXTENSION    197	
-#define T_EXTENSION    198	
-#define T_NO_EXTENSIONS    199	
-#define T_ERROR_WHILE_POSTING_FORM    200	
-#define T_COULD_NOT_GET_FILE    201	
-#define T_NO_PREVIOUS_SEARCH    202	
-#define T_SEARCH_STRING_NOT_FOUND    203	
-#define T_SAVE_ERROR    204	
-#define T_ERROR_WRITING_TO_FILE    205	
-#define T_DISPLAY_USEMAP    206	
-#define T_FOLLOW_LINK    207	
-#define T_OPEN_IN_NEW_WINDOW    208	
-#define T_DOWNLOAD_LINK    209	
-#define T_RESET_FORM    210	
-#define T_SUBMIT_FORM    211	
-#define T_SUBMIT_FORM_AND_OPEN_IN_NEW_WINDOW    212	
-#define T_SUBMIT_FORM_AND_DOWNLOAD    213	
-#define T_VIEW_IMAGE    214	
-#define T_DOWNLOAD_IMAGE    215	
-#define T_NO_LINK_SELECTED    216	
-#define T_IMAGE    217	
-#define T_USEMAP    218	
-#define T_SUBMIT_FORM_TO    219	
-#define T_POST_FORM_TO    220	
-#define T_RADIO_BUTTON    221	
-#define T_CHECKBOX    222	
-#define T_SELECT_FIELD    223	
-#define T_TEXT_FIELD    224	
-#define T_TEXT_AREA    225	
-#define T_FILE_UPLOAD    226	
-#define T_PASSWORD_FIELD    227	
-#define T_NAME    228	
-#define T_VALUE    229	
-#define T_HIT_ENTER_TO    230	
-#define T_SUBMIT_TO    231	
-#define T_POST_TO    232	
-#define T_INFO    233	
-#define T_HEADER_INFO    234	
-#define T_YOU_ARE_NOWHERE    235	
-#define T_URL    236	
-#define T_SIZE    237	
-#define T_INCOMPLETE    238	
-#define T_CODEPAGE    239	
-#define T_ASSUMED    240	
-#define T_IGNORING_SERVER_SETTING    241	
-#define T_SERVER    242	
-#define T_DATE    243	
-#define T_LAST_MODIFIED    244	
-#define T_LANGUAGE    245	
-#define T_XTERM    246	
-#define T_TWTERM    247	
-#define T_SCREEN    248	
-#define T_WINDOW    249	
-#define T_FULL_SCREEN    250	
-#define T_BEOS_TERMINAL    251	
-#define T_NEW_WINDOW    252	
-#define T_GO_TO_LINK    253	
-#define T_ENTER_LINK_NUMBER    254	
-#define T_RESIZE_TERMINAL    255	
-#define T_COLUMNS    256	
-#define T_ROWS    257	
-#define T_BOOKMARKS    258	
-#define T_ADD_BOOKMARK    259	
-#define T_GOTO    260	
-#define T_EDIT    261	
-#define T_CLOSE    262	
-#define T_BOOKMARK_TITLE    263	
-#define T_EDIT_BOOKMARK    264	
-#define T_DELETE_BOOKMARK    265	
-#define T_BOOKMARK_MANAGER    266	
-#define T_url    267	
-#define T_NNAME    268	
-#define T_EXIT_LINKS    269	
-#define T_DO_YOU_REALLY_WANT_TO_EXIT_LINKS    270	
-#define T_DO_YOU_REALLY_WANT_TO_EXIT_LINKS_AND_TERMINATE_ALL_DOWNLOADS    271	
-#define T_HTTP_OPTIONS    272	
-#define T_FTP_OPTIONS    273	
-#define T_HTTP_BUG_WORKAROUNDS    274	
-#define T_USE_HTTP_10    275	
-#define T_ALLOW_SERVER_BLACKLIST    276	
-#define T_BROKEN_302_REDIRECT    277	
-#define T_NO_KEEPALIVE_AFTER_POST_REQUEST    278	
-#define T_PASSWORD_FOR_ANONYMOUS_LOGIN    279	
-#define T_MANUAL    280	
-#define T_MAILTO_PROG    281	
-#define T_TELNET_PROG    282	
-#define T_TN3270_PROG    283	
-#define T_MAIL_AND_TELNET_PROGRAMS    284	
-#define T_NO_PROGRAM    285	
-#define T_NO_PROGRAM_SPECIFIED_FOR    286	
-#define T_MAIL    287	
-#define T_TELNET    288	
-#define T_TN3270    289	
-#define T_BAD_MAILTO_URL    290	
-#define T_BAD_TELNET_URL    291	
-#define T_BAD_TN3270_URL    292	
-#define T_USERID    293	
-#define T_PASSWORD    294	
-#define T_ENTER_USERNAME    295	
-#define T_AT    296	
-#define T_SSL_ERROR    297	
-#define T_NO_SSL    298	
-#define T_HK_ADD_BOOKMARK    299	
-#define T_HK_BOOKMARKS    300	
-#define T_HK_GOTO_URL    301	
-#define T_HK_GO_BACK    302	
-#define T_HK_HISTORY    303	
-#define T_HK_RELOAD    304	
-#define T_HK_SAVE_AS    305	
-#define T_HK_SAVE_URL_AS    306	
-#define T_HK_SAVE_FORMATTED_DOCUMENT    307	
-#define T_HK_KILL_BACKGROUND_CONNECTIONS    308	
-#define T_HK_FLUSH_ALL_CACHES    309	
-#define T_HK_RESOURCE_INFO    310	
-#define T_HK_CACHE_INFO    311	
-#define T_HK_MAIL_AND_TELNEL    312	
-#define T_HK_MEMORY_INFO    313	
-#define T_HK_OS_SHELL    314	
-#define T_HK_RESIZE_TERMINAL    315	
-#define T_HK_EXIT    316	
-#define T_HK_SEARCH    317	
-#define T_HK_SEARCH_BACK    318	
-#define T_HK_FIND_NEXT    319	
-#define T_HK_FIND_PREVIOUS    320	
-#define T_HK_TOGGLE_HTML_PLAIN    321	
-#define T_HK_DOCUMENT_INFO    322	
-#define T_HK_FRAME_AT_FULL_SCREEN    323	
-#define T_HK_HTML_OPTIONS    324	
-#define T_HK_SAVE_HTML_OPTIONS    325	
-#define T_HK_ABOUT    326	
-#define T_HK_KEYS    327	
-#define T_HK_COPYING    328	
-#define T_HK_MANUAL    329	
-#define T_HK_ADD    330	
-#define T_HK_MODIFY    331	
-#define T_HK_DELETE    332	
-#define T_HK_LANGUAGE    333	
-#define T_HK_CHARACTER_SET    334	
-#define T_HK_TERMINAL_OPTIONS    335	
-#define T_HK_NETWORK_OPTIONS    336	
-#define T_HK_CACHE    337	
-#define T_HK_ASSOCIATIONS    338	
-#define T_HK_FILE_EXTENSIONS    339	
-#define T_HK_SAVE_OPTIONS    340	
-#define T_HK_FILE    341	
-#define T_HK_VIEW    342	
-#define T_HK_LINK    343	
-#define T_HK_DOWNLOADS    344	
-#define T_HK_SETUP    345	
-#define T_HK_HELP    346	
-#define T_HK_DISPLAY_USEMAP    347	
-#define T_HK_FOLLOW_LINK    348	
-#define T_HK_OPEN_IN_NEW_WINDOW    349	
-#define T_HK_DOWNLOAD_LINK    350	
-#define T_HK_RESET_FORM    351	
-#define T_HK_SUBMIT_FORM    352	
-#define T_HK_SUBMIT_FORM_AND_OPEN_IN_NEW_WINDOW    353	
-#define T_HK_SUBMIT_FORM_AND_DOWNLOAD    354	
-#define T_HK_VIEW_IMAGE    355	
-#define T_HK_DOWNLOAD_IMAGE    356	
-#define T_HK_XTERM    357	
-#define T_HK_TWTERM    358	
-#define T_HK_SCREEN    359	
-#define T_HK_WINDOW    360	
-#define T_HK_FULL_SCREEN    361	
-#define T_HK_BEOS_TERMINAL    362	
-#define T_HK_NEW_WINDOW    363	
-#define T__N_TEXTS    364	
+#define T_FAKE_REFERER    141	
+#define T_REFERER_NONE    142	
+#define T_REFERER_TRUE    143	
+#define T_REFERER_SAME_URL    144	
+#define T_REFERER_FAKE    145	
+#define T_NO_CONTENT    146	
+#define T_UNKNOWN_FILE_TYPE    147	
+#define T_ERROR_OPENING_FILE    148	
+#define T_BAD_FTP_RESPONSE    149	
+#define T_FTP_SERVICE_UNAVAILABLE    150	
+#define T_BAD_FTP_LOGIN    151	
+#define T_FTP_PORT_COMMAND_FAILED    152	
+#define T_FILE_NOT_FOUND    153	
+#define T_FTP_FILE_ERROR    154	
+#define T_UNKNOWN_ERROR    155	
+#define T_RECEIVED    156	
+#define T_OF    157	
+#define T_AVG    158	
+#define T_CUR    159	
+#define T_AVERAGE_SPEED    160	
+#define T_SPEED    161	
+#define T_CURRENT_SPEED    162	
+#define T_ELAPSED_TIME    163	
+#define T_ESTIMATED_TIME    164	
+#define T_BACKGROUND    165	
+#define T_ABORT    166	
+#define T_YES    167	
+#define T_NO    168	
+#define T_DOWNLOAD_ERROR    169	
+#define T_COULD_NOT_WRITE_TO_FILE    170	
+#define T_ERROR_DOWNLOADING    171	
+#define T_COULD_NOT_CREATE_FILE    172	
+#define T_UNKNOWN_TYPE    173	
+#define T_CONTEN_TYPE_IS    174	
+#define T_DO_YOU_WANT_TO_SAVE_OR_DISLPAY_THIS_FILE    175	
+#define T_SAVE    176	
+#define T_DISPLAY    177	
+#define T_WHAT_TO_DO    178	
+#define T_DO_YOU_WANT_TO_OPEN_FILE_WITH    179	
+#define T_SAVE_IT_OR_DISPLAY_IT    180	
+#define T_OPEN    181	
+#define T_DO_YOU_WANT_TO_FOLLOW_REDIRECT_AND_POST_FORM_DATA_TO_URL    182	
+#define T_DO_YOU_WANT_TO_POST_FORM_DATA_TO_URL    183	
+#define T_DO_YOU_WANT_TO_REPOST_FORM_DATA_TO_URL    184	
+#define T_WARNING    185	
+#define T_ERROR    186	
+#define T_WELCOME    187	
+#define T_WELCOME_TO_LINKS    188	
+#define T_BASIC_HELP    189	
+#define T_LABEL    190	
+#define T_CONTENT_TYPES    191	
+#define T_PROGRAM__IS_REPLACED_WITH_FILE_NAME    192	
+#define T_BLOCK_TERMINAL_WHILE_PROGRAM_RUNNING    193	
+#define T_RUN_ON_TERMINAL    194	
+#define T_RUN_IN_XWINDOW    195	
+#define T_ASK_BEFORE_OPENING    196	
+#define T_DELETE_ASSOCIATION    197	
+#define T_ASSOCIATION    198	
+#define T_EXTENSION_S    199	
+#define T_CONTENT_TYPE    200	
+#define T_NO_ASSOCIATIONS    201	
+#define T_DELETE_EXTENSION    202	
+#define T_EXTENSION    203	
+#define T_NO_EXTENSIONS    204	
+#define T_ERROR_WHILE_POSTING_FORM    205	
+#define T_COULD_NOT_GET_FILE    206	
+#define T_NO_PREVIOUS_SEARCH    207	
+#define T_SEARCH_STRING_NOT_FOUND    208	
+#define T_SAVE_ERROR    209	
+#define T_ERROR_WRITING_TO_FILE    210	
+#define T_DISPLAY_USEMAP    211	
+#define T_FOLLOW_LINK    212	
+#define T_OPEN_IN_NEW_WINDOW    213	
+#define T_DOWNLOAD_LINK    214	
+#define T_RESET_FORM    215	
+#define T_SUBMIT_FORM    216	
+#define T_SUBMIT_FORM_AND_OPEN_IN_NEW_WINDOW    217	
+#define T_SUBMIT_FORM_AND_DOWNLOAD    218	
+#define T_VIEW_IMAGE    219	
+#define T_DOWNLOAD_IMAGE    220	
+#define T_NO_LINK_SELECTED    221	
+#define T_IMAGE    222	
+#define T_USEMAP    223	
+#define T_SUBMIT_FORM_TO    224	
+#define T_POST_FORM_TO    225	
+#define T_RADIO_BUTTON    226	
+#define T_CHECKBOX    227	
+#define T_SELECT_FIELD    228	
+#define T_TEXT_FIELD    229	
+#define T_TEXT_AREA    230	
+#define T_FILE_UPLOAD    231	
+#define T_PASSWORD_FIELD    232	
+#define T_NAME    233	
+#define T_VALUE    234	
+#define T_HIT_ENTER_TO    235	
+#define T_SUBMIT_TO    236	
+#define T_POST_TO    237	
+#define T_INFO    238	
+#define T_HEADER_INFO    239	
+#define T_YOU_ARE_NOWHERE    240	
+#define T_URL    241	
+#define T_SIZE    242	
+#define T_INCOMPLETE    243	
+#define T_CODEPAGE    244	
+#define T_ASSUMED    245	
+#define T_IGNORING_SERVER_SETTING    246	
+#define T_SERVER    247	
+#define T_DATE    248	
+#define T_LAST_MODIFIED    249	
+#define T_LANGUAGE    250	
+#define T_XTERM    251	
+#define T_TWTERM    252	
+#define T_SCREEN    253	
+#define T_WINDOW    254	
+#define T_FULL_SCREEN    255	
+#define T_BEOS_TERMINAL    256	
+#define T_NEW_WINDOW    257	
+#define T_GO_TO_LINK    258	
+#define T_ENTER_LINK_NUMBER    259	
+#define T_RESIZE_TERMINAL    260	
+#define T_COLUMNS    261	
+#define T_ROWS    262	
+#define T_BOOKMARKS    263	
+#define T_ADD_BOOKMARK    264	
+#define T_GOTO    265	
+#define T_EDIT    266	
+#define T_CLOSE    267	
+#define T_BOOKMARK_TITLE    268	
+#define T_EDIT_BOOKMARK    269	
+#define T_DELETE_BOOKMARK    270	
+#define T_BOOKMARK_MANAGER    271	
+#define T_url    272	
+#define T_NNAME    273	
+#define T_EXIT_LINKS    274	
+#define T_DO_YOU_REALLY_WANT_TO_EXIT_LINKS    275	
+#define T_DO_YOU_REALLY_WANT_TO_EXIT_LINKS_AND_TERMINATE_ALL_DOWNLOADS    276	
+#define T_HTTP_OPTIONS    277	
+#define T_FTP_OPTIONS    278	
+#define T_HTTP_BUG_WORKAROUNDS    279	
+#define T_USE_HTTP_10    280	
+#define T_ALLOW_SERVER_BLACKLIST    281	
+#define T_BROKEN_302_REDIRECT    282	
+#define T_NO_KEEPALIVE_AFTER_POST_REQUEST    283	
+#define T_PASSWORD_FOR_ANONYMOUS_LOGIN    284	
+#define T_MANUAL    285	
+#define T_MAILTO_PROG    286	
+#define T_TELNET_PROG    287	
+#define T_TN3270_PROG    288	
+#define T_MAIL_AND_TELNET_PROGRAMS    289	
+#define T_NO_PROGRAM    290	
+#define T_NO_PROGRAM_SPECIFIED_FOR    291	
+#define T_MAIL    292	
+#define T_TELNET    293	
+#define T_TN3270    294	
+#define T_BAD_MAILTO_URL    295	
+#define T_BAD_TELNET_URL    296	
+#define T_BAD_TN3270_URL    297	
+#define T_USERID    298	
+#define T_PASSWORD    299	
+#define T_ENTER_USERNAME    300	
+#define T_AT    301	
+#define T_SSL_ERROR    302	
+#define T_NO_SSL    303	
+#define T_HK_ADD_BOOKMARK    304	
+#define T_HK_BOOKMARKS    305	
+#define T_HK_GOTO_URL    306	
+#define T_HK_GO_BACK    307	
+#define T_HK_HISTORY    308	
+#define T_HK_RELOAD    309	
+#define T_HK_SAVE_AS    310	
+#define T_HK_SAVE_URL_AS    311	
+#define T_HK_SAVE_FORMATTED_DOCUMENT    312	
+#define T_HK_KILL_BACKGROUND_CONNECTIONS    313	
+#define T_HK_FLUSH_ALL_CACHES    314	
+#define T_HK_RESOURCE_INFO    315	
+#define T_HK_CACHE_INFO    316	
+#define T_HK_MAIL_AND_TELNEL    317	
+#define T_HK_MEMORY_INFO    318	
+#define T_HK_OS_SHELL    319	
+#define T_HK_RESIZE_TERMINAL    320	
+#define T_HK_EXIT    321	
+#define T_HK_SEARCH    322	
+#define T_HK_SEARCH_BACK    323	
+#define T_HK_FIND_NEXT    324	
+#define T_HK_FIND_PREVIOUS    325	
+#define T_HK_TOGGLE_HTML_PLAIN    326	
+#define T_HK_DOCUMENT_INFO    327	
+#define T_HK_FRAME_AT_FULL_SCREEN    328	
+#define T_HK_HTML_OPTIONS    329	
+#define T_HK_SAVE_HTML_OPTIONS    330	
+#define T_HK_ABOUT    331	
+#define T_HK_KEYS    332	
+#define T_HK_COPYING    333	
+#define T_HK_MANUAL    334	
+#define T_HK_ADD    335	
+#define T_HK_MODIFY    336	
+#define T_HK_DELETE    337	
+#define T_HK_LANGUAGE    338	
+#define T_HK_CHARACTER_SET    339	
+#define T_HK_TERMINAL_OPTIONS    340	
+#define T_HK_NETWORK_OPTIONS    341	
+#define T_HK_CACHE    342	
+#define T_HK_ASSOCIATIONS    343	
+#define T_HK_FILE_EXTENSIONS    344	
+#define T_HK_SAVE_OPTIONS    345	
+#define T_HK_FILE    346	
+#define T_HK_VIEW    347	
+#define T_HK_LINK    348	
+#define T_HK_DOWNLOADS    349	
+#define T_HK_SETUP    350	
+#define T_HK_HELP    351	
+#define T_HK_DISPLAY_USEMAP    352	
+#define T_HK_FOLLOW_LINK    353	
+#define T_HK_OPEN_IN_NEW_WINDOW    354	
+#define T_HK_DOWNLOAD_LINK    355	
+#define T_HK_RESET_FORM    356	
+#define T_HK_SUBMIT_FORM    357	
+#define T_HK_SUBMIT_FORM_AND_OPEN_IN_NEW_WINDOW    358	
+#define T_HK_SUBMIT_FORM_AND_DOWNLOAD    359	
+#define T_HK_VIEW_IMAGE    360	
+#define T_HK_DOWNLOAD_IMAGE    361	
+#define T_HK_XTERM    362	
+#define T_HK_TWTERM    363	
+#define T_HK_SCREEN    364	
+#define T_HK_WINDOW    365	
+#define T_HK_FULL_SCREEN    366	
+#define T_HK_BEOS_TERMINAL    367	
+#define T_HK_NEW_WINDOW    368	
+#define T__N_TEXTS    369	
diff -ru links-0.96/language.inc links-0.96+true-referer/language.inc
--- links-0.96/language.inc	Mon Jul  2 02:28:15 2001
+++ links-0.96+true-referer/language.inc	Sat Oct  6 18:20:48 2001
@@ -142,6 +142,11 @@
   T_CANT_GET_SOCKET_STATE, "Can't get socket state",
   T_BAD_HTTP_RESPONSE, "Bad HTTP response",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, "Fixed HTTP Referer",
+  T_REFERER_NONE, "No referer",
+  T_REFERER_TRUE, "Send previous URL as referer (normal operation, INSECURE)",
+  T_REFERER_SAME_URL, "Send requested URL as referer",
+  T_REFERER_FAKE, "Fixed referer",
   T_NO_CONTENT, "No content",
   T_UNKNOWN_FILE_TYPE, "Unknown file type",
   T_ERROR_OPENING_FILE, "Error opening file",
@@ -510,6 +515,11 @@
   T_CANT_GET_SOCKET_STATE, "Não posso obter o status do socket",
   T_BAD_HTTP_RESPONSE, "Resposta HTTP incorreta",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Sem conteúdo",
   T_UNKNOWN_FILE_TYPE, "Tipo de arquivo desconhecido",
   T_ERROR_OPENING_FILE, "Erro ao abrir arquivo",
@@ -878,6 +888,11 @@
   T_CANT_GET_SOCKET_STATE, "Íå ìîæå äà ñå ïîëó÷è ñúñòîÿíèåòî íà socket-à",
   T_BAD_HTTP_RESPONSE, "Íåâàëèäåí HTTP îòãîâîð",
   T_HTTP_100, NULL,
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Íÿìà äàííè",
   T_UNKNOWN_FILE_TYPE, "Íåèçâåñòåí òèï ôàéë",
   T_ERROR_OPENING_FILE, "Ãðåøêà ïðè îòâàðÿíåòî íà ôàéë",
@@ -1246,6 +1261,11 @@
   T_CANT_GET_SOCKET_STATE, "Nemù¾u zjistit stav socketu",
   T_BAD_HTTP_RESPONSE, "©patná HTTP odpovìï (asi bugovitý server)",
   T_HTTP_100, "HTTP 100 (?)",
+  T_FAKE_REFERER, "Fale¹ný HTTP referer",
+  T_REFERER_NONE, "Neposílat HTTP referer",
+  T_REFERER_TRUE, "Posílat pøedchozí URL jako referer (normalní a NEBEZPEÈNÉ)",
+  T_REFERER_SAME_URL, "Posílat vy¾ádané URL jako referer",
+  T_REFERER_FAKE, "Posílat fale¹ný HTTP referer",
   T_NO_CONTENT, "®ádnej obsah",
   T_UNKNOWN_FILE_TYPE, "Neznámej typ souboru",
   T_ERROR_OPENING_FILE, "Chybièka pøi ètení souboru",
@@ -1614,6 +1634,11 @@
   T_CANT_GET_SOCKET_STATE, "Ei saa kätte sokli staatust",
   T_BAD_HTTP_RESPONSE, "Vigane HTTP vastus",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Sisu puudub",
   T_UNKNOWN_FILE_TYPE, "Tundmatu failitüüp",
   T_ERROR_OPENING_FILE, "Viga faili avamisel",
@@ -1982,6 +2007,11 @@
   T_CANT_GET_SOCKET_STATE, "impossible d'obtenir l'état du socket",
   T_BAD_HTTP_RESPONSE, "Réponse HTTP incorrecte",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Pas de contenu",
   T_UNKNOWN_FILE_TYPE, "Type de fichier inconnu",
   T_ERROR_OPENING_FILE, "Erreur lors de l'ouverture du fichier",
@@ -2350,6 +2380,11 @@
   T_CANT_GET_SOCKET_STATE, "Non se puido saber o estado do socket",
   T_BAD_HTTP_RESPONSE, "Resposta HTTP incorrecta",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Non hai contido",
   T_UNKNOWN_FILE_TYPE, "Tipo de ficheiro descoñecido",
   T_ERROR_OPENING_FILE, "Erro abrindo ficheiro",
@@ -2718,6 +2753,11 @@
   T_CANT_GET_SOCKET_STATE, "kann Socket-Status nicht abfragen",
   T_BAD_HTTP_RESPONSE, "fehlerhafte HTTP-Antwort",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Kein Inhalt",
   T_UNKNOWN_FILE_TYPE, "Unbekannter Dateityp",
   T_ERROR_OPENING_FILE, "Fehler bei Datei-Öffnung",
@@ -3086,6 +3126,11 @@
   T_CANT_GET_SOCKET_STATE, "Áäýíáôç ç ëÞøç êáôÜóôáóçò õðïäï÷Ýá",
   T_BAD_HTTP_RESPONSE, "Ìç Ýãêõñç áðÜíôçóç HTTP",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Äåí õðÜñ÷åé ðåñéå÷üìåíï",
   T_UNKNOWN_FILE_TYPE, "¶ãíùóôï åßäïò áñ÷åßïõ",
   T_ERROR_OPENING_FILE, "Error opening file",
@@ -3454,6 +3499,11 @@
   T_CANT_GET_SOCKET_STATE, "Nem lehet a csatorna állapotát megállapítani",
   T_BAD_HTTP_RESPONSE, "Hibás HTTP válasz",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "A lap üres",
   T_UNKNOWN_FILE_TYPE, "Ismeretlen fájlformátum",
   T_ERROR_OPENING_FILE, "Hiba a fájl megnyitásakor",
@@ -3822,6 +3872,11 @@
   T_CANT_GET_SOCKET_STATE, "Finn ekki stöðu gáttar",
   T_BAD_HTTP_RESPONSE, "Ógilt HTTP svar",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Ekkert efni",
   T_UNKNOWN_FILE_TYPE, "Óþekkt skráartegund",
   T_ERROR_OPENING_FILE, "Villa við opnun skráar",
@@ -4190,6 +4245,11 @@
   T_CANT_GET_SOCKET_STATE, "Non posso prendere lo stato della socket",
   T_BAD_HTTP_RESPONSE, "Risposta HTTP errata",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Nessun contenuto",
   T_UNKNOWN_FILE_TYPE, "Tipo file sconosciuto",
   T_ERROR_OPENING_FILE, "Errore nell'apertura del file",
@@ -4558,6 +4618,11 @@
   T_CANT_GET_SOCKET_STATE, "Negaunu soket'o bûsenos",
   T_BAD_HTTP_RESPONSE, "Blogas HTTP atsakymas",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Nëra turinio",
   T_UNKNOWN_FILE_TYPE, "Neþinomas failo tipas",
   T_ERROR_OPENING_FILE, "Klaida bandant atidaryti failà",
@@ -4926,6 +4991,11 @@
   T_CANT_GET_SOCKET_STATE, "Nie mo¿na zbadaæ stanu gniazda",
   T_BAD_HTTP_RESPONSE, "Nieprawid³owa odpowied¼ HTTP",
   T_HTTP_100, NULL,
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Plik pusty",
   T_UNKNOWN_FILE_TYPE, "Nieznay typ pliku",
   T_ERROR_OPENING_FILE, "B³±d przy otwieraniu pliku",
@@ -5294,6 +5364,11 @@
   T_CANT_GET_SOCKET_STATE, "îÅÌØÚÑ ÐÏÌÕÞÉÔØ ÓÏÓÔÏÑÎÉÅ ÓÏËÅÔÁ",
   T_BAD_HTTP_RESPONSE, "îÅ×ÅÒÎÙÊ ÏÔ×ÅÔ HTTP",
   T_HTTP_100, NULL,
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "îÅÔ ÄÁÎÎÙÈ",
   T_UNKNOWN_FILE_TYPE, "îÅÉÚ×ÅÓÔÎÙÊ ÔÉÐ ÆÁÊÌÁ",
   T_ERROR_OPENING_FILE, "ïÛÉÂËÁ ÏÔËÒÙÔÉÑ ÆÁÊÌÁ",
@@ -5662,6 +5737,11 @@
   T_CANT_GET_SOCKET_STATE, "Nemô¾em zisti» stav socketu",
   T_BAD_HTTP_RESPONSE, "Zlá HTTP odpoveï (asi bugovitý server)",
   T_HTTP_100, "HTTP 100 (?)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "®iadny obsah",
   T_UNKNOWN_FILE_TYPE, "Neznámy typ súboru",
   T_ERROR_OPENING_FILE, "Chyba pri èítaní súboru",
@@ -6030,6 +6110,11 @@
   T_CANT_GET_SOCKET_STATE, "No puedo saber el estado del socket",
   T_BAD_HTTP_RESPONSE, "Respuesta HTTP incorrecta",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Sin contenido",
   T_UNKNOWN_FILE_TYPE, "Tipo de fichero desconocido",
   T_ERROR_OPENING_FILE, "Error abriendo fichero",
@@ -6398,6 +6483,11 @@
   T_CANT_GET_SOCKET_STATE, "Kan inte se sockettillstånd",
   T_BAD_HTTP_RESPONSE, "Felaktigt HTTP-svar",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Inget innehåll",
   T_UNKNOWN_FILE_TYPE, "Okänd filtyp",
   T_ERROR_OPENING_FILE, "Fel vid öppnande av fil",
@@ -6766,6 +6856,11 @@
   T_CANT_GET_SOCKET_STATE, "Soket durumu alýnamýyor",
   T_BAD_HTTP_RESPONSE, "Hatalý HTTP cevabý",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "Ýçerik YOK",
   T_UNKNOWN_FILE_TYPE, "Bilinmeyen dosya türü",
   T_ERROR_OPENING_FILE, "Dosya açýlýrken hata",
@@ -7134,6 +7229,11 @@
   T_CANT_GET_SOCKET_STATE, "îÅÍÏÖÌÉ×Ï ÏÔÒÉÍÁÔÉ ÓÔÁÎ ÓÏËÅÔÕ",
   T_BAD_HTTP_RESPONSE, "îÅÐÒÁ×ÉÌØÎÁ ×¦ÄÐÏ×¦ÄØ HTTP",
   T_HTTP_100, "HTTP 100 (???)",
+  T_FAKE_REFERER, NULL,
+  T_REFERER_NONE, NULL,
+  T_REFERER_TRUE, NULL,
+  T_REFERER_SAME_URL, NULL,
+  T_REFERER_FAKE, NULL,
   T_NO_CONTENT, "îÅÍÁ ¦ÎÆÏÒÍÁÃ¦§",
   T_UNKNOWN_FILE_TYPE, "îÅ×¦ÄÏÍÉÊ ÔÉÐ ÆÁÊÌÕ",
   T_ERROR_OPENING_FILE, "ðÏÍÉÌËÁ ×¦ÄËÒÉÔÔÑ ÆÁÊÌÕ",
diff -ur links-0.96/main.c links-0.96+moved/main.c
--- links-0.96/main.c	Wed Sep  5 21:23:39 2001
+++ links-0.96+moved/main.c	Wed Sep  5 21:18:39 2001
@@ -161,7 +161,7 @@
 	if (ce && ce->redirect) {
 		unsigned char *u, *p;
 		if (stat->state >= 0) change_connection(stat, NULL, PRI_CANCEL);
-		u = stracpy(ce->redirect);
+		u = join_urls(ce->url, ce->redirect);
 		if (!http_bugs.bug_302_redirect) if (!ce->redirect_get && (p = strchr(ce->url, POST_CHAR))) add_to_strn(&u, p);
 		load_url(u, ce->url, stat, PRI_MAIN, 0);
 		mem_free(u);
diff -ru links-0.96/kbdbind.c links-0.96+editarea/kbdbind.c
--- links-0.96/kbdbind.c	Sat Sep  8 08:02:45 2001
+++ links-0.96+editarea/kbdbind.c	Sat Sep  8 08:02:21 2001
@@ -154,6 +154,7 @@
 		"document-info",
 		"down",
 		"download",
+		"edit",
 		"end",
 		"enter",
 		"file-menu",
@@ -358,6 +359,8 @@
 	{ ACT_DOWN, KBD_DOWN, 0 },
 	{ ACT_END, KBD_END, 0 },
 	{ ACT_END, 'E', KBD_CTRL },
+	{ ACT_EDIT, KBD_F4, 0 },
+	{ ACT_EDIT, 'T', KBD_CTRL },
 	{ ACT_COPY_CLIPBOARD, KBD_INS, KBD_CTRL },
 	{ ACT_COPY_CLIPBOARD, 'B', KBD_CTRL },
 	{ ACT_CUT_CLIPBOARD, 'X', KBD_CTRL },
diff -ru links-0.96/links.h links-0.96+editarea/links.h
--- links-0.96/links.h	Sat Sep  8 08:02:52 2001
+++ links-0.96+editarea/links.h	Sat Sep  8 07:59:17 2001
@@ -1713,6 +1713,9 @@
 
 /* view.c */
 
+extern int textarea_editor;
+void textarea_edit(int, struct terminal *, struct form_control *, struct form_state *);
+
 int can_open_in_new(struct terminal *);
 void open_in_new_window(struct terminal *, void (*)(struct terminal *, void (*)(struct terminal *, unsigned char *, unsigned char *), struct session *ses), struct session *);
 void send_open_in_new_xterm(struct terminal *term, void (*open_window)(struct terminal *term, unsigned char *, unsigned char *), struct session *ses);
@@ -2121,6 +2124,7 @@
 	ACT_DOCUMENT_INFO,
 	ACT_DOWN,
 	ACT_DOWNLOAD,
+	ACT_EDIT,
 	ACT_END,
 	ACT_ENTER,
 	ACT_FILE_MENU,
diff -ru links-0.96/terminal.c links-0.96+editarea/terminal.c
--- links-0.96/terminal.c	Tue Apr 17 17:51:49 2001
+++ links-0.96+editarea/terminal.c	Sat Sep  8 07:59:17 2001
@@ -698,6 +698,8 @@
 	set_handlers(term->fdin, (void (*)(void *))in_term, NULL, (void (*)(void *))destroy_terminal, term);
 	unblock_itrm(term->fdin);
 	redraw_terminal_cls(term);
+	if (textarea_editor)	/* XXX */
+		textarea_edit(1, NULL, NULL, NULL);
 }
 
 void exec_on_terminal(struct terminal *term, unsigned char *path, unsigned char *delete, int fg)
diff -ru links-0.96/view.c links-0.96+editarea/view.c
--- links-0.96/view.c	Sat Sep  8 08:02:52 2001
+++ links-0.96+editarea/view.c	Sat Sep  8 07:59:17 2001
@@ -1449,6 +1449,55 @@
 	return -1;
 }
 
+int textarea_editor = 0;
+
+void textarea_edit(int op, struct terminal *term_, struct form_control *form_, struct form_state *fs_)
+{
+	static int form_maxlength;
+	static struct form_state *fs;
+	static struct terminal *term;
+	static char *fn = NULL;
+	char *ed, *ex;
+	FILE *taf;
+	int flen;
+
+	if (form_) form_maxlength = form_->maxlength;
+	if (fs_) fs = fs_;
+	if (term_) term = term_;
+	
+	if (! fn) fn = tempnam(NULL, "linksarea");
+
+	if (! op) {
+		taf = fopen(fn, "w");
+		fwrite(fs->value, strlen(fs->value), 1, taf);
+		fclose(taf);
+					
+		ed = getenv("EDITOR");
+		if (! ed) ed = "vi";
+		ex = mem_alloc(strlen(ed) + strlen(fn) + 2);
+		sprintf(ex, "%s %s", ed, fn);
+		exec_on_terminal(term, ex, "", 1);
+		mem_free(ex);
+
+		textarea_editor = 1;
+		
+	} else {
+	  
+		taf = fopen(fn, "r+");
+		if (taf) {
+			fseek(taf, 0, SEEK_END); flen = ftell(taf); fseek(taf, 0, SEEK_SET);
+			if (flen <= form_maxlength) {
+				mem_free(fs->value);
+				fs->value = mem_alloc(flen + 1);
+				fread(fs->value, flen, 1, taf); fs->value[flen] = 0;
+				fs->state = flen;
+			}
+			fclose(taf);
+		}
+		textarea_editor = 0; fn = NULL;
+	}
+}
+
 int field_op(struct session *ses, struct f_data_c *f, struct link *l, struct event *ev, int rep)
 {
 	struct form_control *form = l->form;
@@ -1540,6 +1589,10 @@
 						mem_free(ln);
 					}
 				} else fs->state = strlen(fs->value);
+				break;
+			case ACT_EDIT:
+				if (form->type == FC_TEXTAREA && !form->ro)
+				  	textarea_edit(0, ses->term, form, fs);
 				break;
 			case ACT_COPY_CLIPBOARD:
 				set_clipboard_text(fs->value);
diff -ru links-0.96/links.1 links-0.96+editarea/links.1
--- links-0.96/links.1	Sat Oct  6 18:04:17 2001
+++ links-0.96+editarea/links.1	Sat Oct  6 18:03:59 2001
@@ -230,6 +230,12 @@
 .B D
 download link
 .TP
+.B F4
+edit textarea in external editor (broken)
+.TP
+.B ^T
+edit textarea in external editor (broken)
+.TP
 .B /
 search in the page
 .TP
diff -ru links-0.96/cookies.c links-0.96+cookies-expire/cookies.c
--- links-0.96/cookies.c	Wed Jun  6 18:32:50 2001
+++ links-0.96+cookies-expire/cookies.c	Sun Sep  2 22:39:19 2001
@@ -13,8 +13,8 @@
 	struct cookie *prev;
 	unsigned char *name, *value;
 	unsigned char *server;
-	unsigned char *expires;
 	unsigned char *path, *domain;
+	time_t expires; /* zero means undefined */
 	int secure;
 	int id;
 };
@@ -46,7 +46,6 @@
 	mem_free(c->name);
 	mem_free(c->value);
 	if (c->server) mem_free(c->server);
-	if (c->expires) mem_free(c->expires);
 	if (c->path) mem_free(c->path);
 	if (c->domain) mem_free(c->domain);
 }
@@ -76,7 +75,7 @@
 {
 	struct cookie *cookie;
 	struct c_server *cs;
-	unsigned char *p, *q, *s, *server, *document;
+	unsigned char *p, *q, *s, *server, *date, *document;
 	if (accept_cookies == ACCEPT_NONE) return 0;
 	for (p = str; *p != ';' && *p; p++) if (WHITECHAR(*p)) return 0;
 	for (q = str; *q != '='; q++) if (!*q || q >= p) return 0;
@@ -87,7 +86,13 @@
 	cookie->name = memacpy(str, q - str);
 	cookie->value = memacpy(q + 1, p - q - 1);
 	cookie->server = stracpy(server);
-	cookie->expires = parse_header_param(str, "expires");
+	date = parse_header_param(str, "expires");
+	if (date) {
+		cookie->expires = parse_http_date(date);
+		if (! cookie->expires) cookie->expires++; /* no harm and we can use zero then */
+		mem_free(date);
+	} else
+		cookie->expires = 0;
 	if (!(cookie->path = parse_header_param(str, "path"))) {
 		unsigned char *w;
 		cookie->path = stracpy("/");
@@ -234,7 +239,7 @@
 
 int cookie_expired(struct cookie *c)
 {
-	return 0;	/* !!! FIXME */
+  	return (c->expires && c->expires < time(NULL));
 }
 
 void send_cookies(unsigned char **s, int *l, unsigned char *url)
diff -ru links-0.96/cookies.c links-0.96+cookies-save/cookies.c
--- links-0.96/cookies.c	Mon Oct  1 14:09:20 2001
+++ links-0.96+cookies-save/cookies.c	Mon Oct  1 14:08:15 2001
@@ -43,8 +43,8 @@
 
 void free_cookie(struct cookie *c)
 {
-	mem_free(c->name);
-	mem_free(c->value);
+	if (c->name) mem_free(c->name);
+	if (c->value) mem_free(c->value);
 	if (c->server) mem_free(c->server);
 	if (c->path) mem_free(c->path);
 	if (c->domain) mem_free(c->domain);
@@ -276,15 +276,99 @@
 
 void init_cookies()
 {
-	/* !!! FIXME: read cookies */
+	unsigned char in_buffer[MAX_STR_LEN];
+	unsigned char *cookfile, *p, *q;
+	FILE *fp;
+
+	/* must be called after init_home */
+	if (! links_home) return;
+	
+	cookfile = stracpy(links_home);
+	if (! cookfile) return;
+	add_to_strn(&cookfile, "cookies");
+
+	fp = fopen(cookfile, "r");
+	mem_free(cookfile);
+	if (fp == NULL) return;
+	
+	while (fgets(in_buffer, MAX_STR_LEN, fp)) {
+		struct cookie *cookie;
+		
+		if (!(cookie = mem_alloc(sizeof(struct cookie)))) return;
+		memset(cookie, 0, sizeof(struct cookie));
+		
+		q = in_buffer; p = strchr(in_buffer, ' ');
+		if (p == NULL) goto inv;
+		*p++ = '\0';
+		cookie->name = stracpy(q);
+		
+		q = p; p = strchr(p, ' ');
+		if (p == NULL) goto inv;
+		*p++ = '\0';
+		cookie->value = stracpy(q);
+		
+		q = p; p = strchr(p, ' ');
+		if (p == NULL) goto inv;
+		*p++ = '\0';
+		cookie->server = stracpy(q);
+		
+		q = p; p = strchr(p, ' ');
+		if (p == NULL) goto inv;
+		*p++ = '\0';
+		cookie->path = stracpy(q);
+		
+		q = p; p = strchr(p, ' ');
+		if (p == NULL) goto inv;
+		*p++ = '\0';
+		cookie->domain = stracpy(q);
+		
+		q = p; p = strchr(p, ' ');
+		if (p == NULL) goto inv;
+		*p++ = '\0';
+		cookie->expires = atoi(q);
+		
+		cookie->secure = atoi(p);
+		
+		cookie->id = cookie_id++;
+
+		accept_cookie(cookie);
+
+		continue;
+
+inv:
+		free_cookie(cookie);
+		free(cookie);
+	}
+	fclose(fp);
 }
 
 void cleanup_cookies()
 {
 	struct cookie *c;
+	unsigned char *cookfile;
+	FILE *fp;
+	
 	free_list(c_domains);
-	/* !!! FIXME: save cookies */
-	foreach (c, cookies) free_cookie(c);
+
+	cookfile = stracpy(links_home);
+	if (! cookfile) return;
+	add_to_strn(&cookfile, "cookies");
+
+	fp = fopen(cookfile, "w");
+	mem_free(cookfile);
+	if (fp == NULL) return;
+	
+	foreach (c, cookies) {
+		if (c->expires && ! cookie_expired(c))
+			fprintf(fp, "%s %s %s %s %s %d %d\n", c->name, c->value,
+			    c->server?c->server:(unsigned char *)"", c->path?c->path:(unsigned char *)"",
+			    c->domain?c->domain:(unsigned char *)"", c->expires, c->secure);
+
+		free_cookie(c);
+	}
+
+	fclose(fp);
+	
 	free_list(cookies);
 }
 
diff -ru links-0.96/cookies.c links-0.96+cookies-resave/cookies.c
--- links-0.96/cookies.c	Tue Oct  2 17:29:36 2001
+++ links-0.96+cookies-resave/cookies.c	Tue Oct  2 17:28:50 2001
@@ -1,5 +1,8 @@
 #include "links.h"
 
+/* #undef it defaultly */
+#define COOKIES_RESAVE	1
+
 #define ACCEPT_NONE	0
 #define ACCEPT_ASK	1
 #define ACCEPT_ALL	2
@@ -41,6 +44,8 @@
 void accept_cookie(struct cookie *);
 void delete_cookie(struct cookie *);
 
+void load_cookies(), save_cookies();
+
 void free_cookie(struct cookie *c)
 {
 	if (c->name) mem_free(c->name);
@@ -161,6 +166,9 @@
 	if (!(cd = mem_alloc(sizeof(struct c_domain) + strlen(c->domain) + 1))) return;
 	strcpy(cd->domain, c->domain);
 	add_to_list(c_domains, cd);
+#ifdef COOKIES_RESAVE
+	save_cookies();
+#endif
 }
 
 void delete_cookie(struct cookie *c)
@@ -177,6 +185,9 @@
 	del_from_list(c);
 	free_cookie(c);
 	mem_free(c);
+#ifdef COOKIES_RESAVE
+	save_cookies();
+#endif
 }
 
 struct cookie *find_cookie_id(void *idp)
@@ -261,6 +272,9 @@
 			del_from_list(d);
 			free_cookie(d);
 			mem_free(d);
+#ifdef COOKIES_RESAVE
+			save_cookies();
+#endif
 			continue;
 		}
 		if (c->secure) continue;
@@ -274,11 +288,11 @@
 	mem_free(server);
 }
 
-void init_cookies()
-{
+void load_cookies() {
 	unsigned char in_buffer[MAX_STR_LEN];
 	unsigned char *cookfile, *p, *q;
 	FILE *fp;
+	struct cookie *c;
 
 	/* must be called after init_home */
 	if (! links_home) return;
@@ -287,6 +301,13 @@
 	if (! cookfile) return;
 	add_to_strn(&cookfile, "cookies");
 
+	/* do it here, as we will delete whole cookies list if the file was removed */
+	free_list(c_domains);
+
+	foreach(c, cookies)
+		free_cookie(c);
+	free_list(cookies);
+
 	fp = fopen(cookfile, "r");
 	mem_free(cookfile);
 	if (fp == NULL) return;
@@ -337,18 +358,17 @@
 
 inv:
 		free_cookie(cookie);
-		free(cookie);
+		mem_free(cookie);
 	}
 	fclose(fp);
 }
 
-void cleanup_cookies()
-{
+int cquit = 0; /* XXX */
+
+void save_cookies() {
 	struct cookie *c;
 	unsigned char *cookfile;
 	FILE *fp;
-	
-	free_list(c_domains);
 
 	cookfile = stracpy(links_home);
 	if (! cookfile) return;
@@ -364,11 +384,25 @@
 			    c->server?c->server:(unsigned char *)"", c->path?c->path:(unsigned char *)"",
 			    c->domain?c->domain:(unsigned char *)"", c->expires, c->secure);
 
-		free_cookie(c);
+		if (cquit)
+			free_cookie(c);
 	}
 
 	fclose(fp);
+}
+
+void init_cookies()
+{
+	load_cookies();
+}
+
+void cleanup_cookies()
+{
+	free_list(c_domains);
+	
+	cquit = 1;
+	save_cookies();
+	cquit = 0;
 	
 	free_list(cookies);
 }
-
diff -ru links-0.96/kbdbind.c links-0.96+cookies-resave/kbdbind.c
--- links-0.96/kbdbind.c	Tue Oct  2 14:24:38 2001
+++ links-0.96+cookies-resave/kbdbind.c	Tue Oct  2 14:40:40 2001
@@ -148,6 +148,7 @@
 		"back",
 		"backspace",
 		"bookmark-manager",
+		"cookies-load",
 		"copy-clipboard",
 		"cut-clipboard",
 		"delete",
@@ -336,6 +337,7 @@
 	{ ACT_ADD_BOOKMARK, 'A' },
 	{ ACT_BOOKMARK_MANAGER, 's' },
 	{ ACT_BOOKMARK_MANAGER, 'S' },
+	{ ACT_COOKIES_LOAD, 'K', KBD_CTRL },
 	{ ACT_QUIT, 'q' },
 	{ ACT_REALLYQUIT, 'Q' },
 	{ ACT_DOCUMENT_INFO, '=' },
diff -ru links-0.96/links.h links-0.96+cookies-resave/links.h
--- links-0.96/links.h	Tue Oct  2 14:24:38 2001
+++ links-0.96+cookies-resave/links.h	Tue Oct  2 14:41:36 2001
@@ -831,6 +831,7 @@
 
 int set_cookie(struct terminal *, unsigned char *, unsigned char *);
 void send_cookies(unsigned char **, int *, unsigned char *);
+void load_cookies();
 void init_cookies();
 void cleanup_cookies();
 
@@ -2118,6 +2119,7 @@
 	ACT_BACK,
 	ACT_BACKSPACE,
 	ACT_BOOKMARK_MANAGER,
+	ACT_COOKIES_LOAD,
 	ACT_COPY_CLIPBOARD,
 	ACT_CUT_CLIPBOARD,
 	ACT_DELETE,
diff -ru links-0.96/view.c links-0.96+cookies-resave/view.c
--- links-0.96/view.c	Tue Oct  2 14:24:38 2001
+++ links-0.96+cookies-resave/view.c	Tue Oct  2 14:43:25 2001
@@ -2089,6 +2089,9 @@
 			case ACT_BOOKMARK_MANAGER:
 				if (!anonymous) menu_bookmark_manager(ses->term, NULL, ses);
 				goto x;
+			case ACT_COOKIES_LOAD:
+				if (!anonymous) load_cookies();
+				goto x;
 			case ACT_REALLYQUIT:
 				reallyquit:
 				exit_prog(ses->term, (void *)1, ses);
diff -ru links-0.96/links.1 links-0.96+cookies-save/links.1
--- links-0.96/links.1	Sat Oct  6 17:50:54 2001
+++ links-0.96+cookies-save/links.1	Sat Oct  6 17:50:36 2001
@@ -413,6 +413,9 @@
 .IP "~/.links/bookmarks"
 Bookmarks file
 
+.IP "~/.links/cookies"
+Cookies file
+
 .IP "~/.links/links.his"
 Sites history file
 
diff -ru links-0.96/links.1 links-0.96+cookies-resave/links.1
--- links-0.96/links.1	Sat Oct  6 17:51:48 2001
+++ links-0.96+cookies-resave/links.1	Sat Oct  6 17:53:18 2001
@@ -269,6 +269,9 @@
 .B S
 bookmark manager
 .TP
+.B ^K
+reload cookies from ~/.links/cookies
+.TP
 .B q
 quit
 .TP
diff -ur links-0.96/html.c links-0.96+noqstrip/html.c
--- links-0.96/html.c	Mon Jun 18 21:56:09 2001
+++ links-0.96+noqstrip/html.c	Tue Sep 18 20:35:31 2001
@@ -1040,7 +1040,7 @@
 	} else {
 		if ((ch = strchr(form->action = stracpy(format.href_base), POST_CHAR))) *ch = 0;
 	}
-	if ((ch = strchr(form->action, '?'))) *ch = 0;
+/*	if ((ch = strchr(form->action, '?'))) *ch = 0;*/
 	if ((al = get_target(a))) {
 		form->target = al;
 	} else {
@@ -1048,10 +1048,6 @@
 	}
 	form->method = FM_GET;
 	if ((al = get_attr_val(a, "method"))) {
-		if (!strcasecmp(al, "get")) {
-			form->method = FM_GET;
-			if (ch = strchr(form->action, '?')) *ch = 0;
-		}
 		if (!strcasecmp(al, "post")) {
 			char *ax;
 			form->method = FM_POST;
diff -ur links-0.96/view.c links-0.96+noqstrip/view.c
--- links-0.96/view.c	Tue Sep 18 23:11:42 2001
+++ links-0.96+noqstrip/view.c	Tue Sep 18 20:44:15 2001
@@ -1320,7 +1320,10 @@
 				pos = stracpy(pos);
 				*poss = 0;
 			}
-			strcat(go, "?");
+			if (strchr(go, '?'))
+			  strcat(go, "&");
+			else
+			  strcat(go, "?");
 			strcat(go, data);
 			if (pos) strcat(go, pos), mem_free(pos);
 		}
diff -ur links-0.96/charsets.c links-0.96+crfix/charsets.c
--- links-0.96/charsets.c	Sun Dec 31 23:26:52 2000
+++ links-0.96+crfix/charsets.c	Tue Sep 18 14:49:56 2001
@@ -242,6 +242,7 @@
 				else return NULL;
 				if (n >= 0x10000) return NULL;
 			} while (--l);
+			if (n == 13) n = 10; /* be lynx-like, be broken, be smart */
 		}
 	} else {
 		int s = 0, e = N_ENTITIES - 1;
diff -ru links-0.96/kbdbind.c links-0.96+kbindfix/kbdbind.c
--- links-0.96/kbdbind.c	Sat Oct  6 16:42:47 2001
+++ links-0.96+kbindfix/kbdbind.c	Sat Oct  6 16:40:22 2001
@@ -179,6 +179,7 @@
 		"page-up",
 		"paste-clipboard",
 		"previous-frame",
+		"reallyquit",
 		"quit",
 		"reload",
 		"right",
