1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-07 13:34:34 -04:00
Commit Graph

306 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
11e6aa8d97 Bug 944, SMB: Fix leaks and libsmbclient 3.0.10 compatibility. 2007-02-25 21:15:46 +02:00
Witold Filipczyk
5289a840d8 smb2: Do not use smb_options. 2007-02-25 16:53:54 +02:00
Witold Filipczyk
546a52597f Typo. 2007-02-25 16:53:45 +02:00
Witold Filipczyk
a0db520267 smb: remember the username and the password given in the uri.
[ This is half of commit c7f6f76951
  from the witekfl branch.  The FSP half will come later.  --KON ]
2007-02-25 16:53:35 +02:00
Witold Filipczyk
0c1371b161 smb: minor optimisation. 2007-02-25 16:52:25 +02:00
Witold Filipczyk
0cf6f91394 smb: Encode and decode spaces in filenames. 2007-02-25 16:52:19 +02:00
Witold Filipczyk
28fcc17564 smb: Do not encode ' ' as %20 in base href. 2007-02-25 16:52:07 +02:00
Witold Filipczyk
36477ffa45 smb: set_nonblocking_fd
[ This is part of commit 71adb0e6cc from
  the witekfl branch.  The FSP and CGI parts will come later.  --KON ]
2007-02-25 16:51:53 +02:00
Witold Filipczyk
c828cda079 smb: used string functions in place of printf and puts. 2007-02-25 16:50:22 +02:00
Witold Filipczyk
916b5cf545 smb: abort connection on empty files.
Empty files were causing 'read from socket' errors.

[ This is half of commit eef1c17dce
  from the witekfl branch.  The FSP half will come later.  --KON ]
2007-02-25 16:50:02 +02:00
Witold Filipczyk
f70196dde8 smb: used string functions instead of snprintf. 2007-02-25 16:47:21 +02:00
Witold Filipczyk
a584aacb26 smb2: show comments. 2007-02-25 16:47:06 +02:00
Witold Filipczyk
d399c809f7 The SMB protocol handling using libsmbclient. 2007-02-25 16:46:55 +02:00
Kalle Olavi Niemitalo
927f08ec6a Revert 5f36ad302e, to make bug 534 less likely to occur.
Revert commit 5f36ad302e,
"Decompression: write PIPE_BUF bytes to the pipe at once if possible."
Without this reversion, <http://blogs.msdn.com/> displays as garbage.
It has Content-Encoding: gzip and Transfer-Encoding: chunked.
2007-02-25 16:09:25 +02:00
Kalle Olavi Niemitalo
4d7d8acaf5 Bug 937, http_send_header: indentation fix 2007-02-25 15:14:18 +02:00
Kalle Olavi Niemitalo
4e4dddb4cc Bug 937, http_send_header: Don't send all headers to CONNECT proxy. 2007-02-25 12:49:56 +02:00
Witold Filipczyk
728c97556d bzip2: Used the patch from bug the 517.
Removed the bzip2-pipe.patch from contrib.
2007-02-24 16:12:49 +02:00
Witold Filipczyk
0fe90d6ac6 bzip2: added the configure option --enable-bzip2-encoding
Use it with the patched bzlib. The patch in contrib.
Added the bzip2-pipe.patch.README.
2007-02-24 16:12:39 +02:00
Witold Filipczyk
5f36ad302e Decompression: write PIPE_BUF bytes to the pipe at once if possible. 2007-02-24 16:12:24 +02:00
Witold Filipczyk
24a96717a6 BZ_bzRead2 is based on BZ_bzRead from the bzlib library.
Slightly modified to handle reading from the pipe. This fixes the bug 517.
2007-02-24 16:12:11 +02:00
Witold Filipczyk
573bd43e0c The gzip decompression simplification. gzclearerr does the job. 2007-02-24 16:12:02 +02:00
Kalle Olavi Niemitalo
c62e9f9eae check_http_server_bugs: Make buggy_servers[] const. 2007-02-04 15:30:51 +02:00
Kalle Olavi Niemitalo
c8a57c562f Make http_code[] const; make http_code[].str point to const. 2007-02-04 15:18:45 +02:00
Kalle Olavi Niemitalo
d7e4b57146 Make instances of struct listbox_ops const. 2007-02-04 15:17:49 +02:00
Kalle Olavi Niemitalo
a5e321cb2b Make instances of struct hierbox_browser_button const.
And explicitly disable the "Save" buttons in anonymous mode,
even though they are currently inside #if 0.
2007-02-04 13:54:07 +02:00
Kalle Olavi Niemitalo
31dc108c73 end_with_known_tld: Make tld[] const. 2007-02-04 13:46:45 +02:00
Kalle Olavi Niemitalo
18771fdedb Bug 924, my_timegm: Added a comment about 2100 not being a leap year. 2007-01-13 15:38:02 +02:00
Kalle Olavi Niemitalo
01fdf6c4d3 Bug 923: Added comments about potential time_t truncation.
And removed Miciah's portability question; MSVC++2005 already
has a time_t longer than long, so assuming that time_t is long
is surely not portable.
2007-01-13 15:26:21 +02:00
Kalle Olavi Niemitalo
9385c93ffd Move README.timegm to the same directory as date.c. 2007-01-13 10:01:51 +02:00
Jonas Fonseca
7589d4457a Bug 899: Fix size handling in FTP directory listings
This fixes parse_ftp_number to use off_t instead of long to store its
(intermediate) result and return type. It also introduces an OFFT_MAX type
"limit" that is used for validating the size of the parsed number.

A test-case for was added in 37c9bf3f75 to
test-ftp-parser and the patch has been confirmed to fix the test-case by
adamg and me.  This closes bug 899, which is a duplicate of debian bug
403139.
2006-12-18 18:51:57 +01:00
Jonas Fonseca
37c9bf3f75 Test response from server mentioned in debian bug 403139
The problem is in the FTP directory listing and number parser which stores
it intermediate results in a variable of type long.
2006-12-15 22:36:53 +01:00
Jonas Fonseca
f90c07d54f Make it possible to request only the password component of an URI
Before it was only to get the password when the user name was also
requested.  This fixes FSP access to password protected directories.

The problem was discovered by Witold and mentioned in the post to
elinks-dev with the message-id: <20061209204151.GA32758@pldmachine> on
2006-12-09.
2006-12-10 21:46:32 +01:00
Kalle Olavi Niemitalo
3988ab97cc about_protocol_handler: Don't define len if CONFIG_SMALL.
It is not used if CONFIG_SMALL is defined, and GCC complained about this.
With -Werror added by --enable-debug, the whole build failed.
2006-12-10 17:16:38 +02:00
Kalle Olavi Niemitalo
bddafe5f7e Document how timer callbacks erase timer IDs; add some assertions.
Tangential to bug 868.
2006-12-02 18:35:03 +02:00
Kalle Olavi Niemitalo
f915c31127 Bug 841, CVE-2006-5925: Prevent enabling the SMB protocol.
src/protocol/smb/smb.c: Added #error directives so that this
vulnerable code cannot be accidentally compiled in.

features.conf: Disable CONFIG_SMB by default and explain why.

configure.in: If CONFIG_SMB is enabled, disable it and warn the user.
This is for people who have customized features.conf.
2006-11-18 20:39:01 +02:00
Kalle Olavi Niemitalo
18f30e7886 decompress_data: Always initialize to_read, avoiding a GCC warning.
"'to_read' may be used uninitialized in this function" was a false warning
but removing it will make important warnings easier to see.
2006-11-11 14:12:39 +02:00
Miciah Dashiel Butler Masters
810a1fc591 data_compress: fix problem with decompression after recent change
Fix bug 834 (various gzip-encoded documents were being truncated),
which I introduced with commit e441361f2c.

Thanks to Witek for reporting the bug, Kalle for determining the
problematic commit, and Jonas for letting me know about the bug report(!).
2006-11-10 15:57:23 +00:00
Jonas Fonseca
b61d8d06d9 Fix crashes with various bogus BitTorrent URLs
... mainly bittorrent:// and bittorrent://x

The BitTorrent URL is supposed to contain an embedded URL pointing to a
metainfo file. If this is not the case a "custom" error message will be
shown. Also fixes calling of free_list() on an uninitialized list.

Closes bug 729.
2006-11-06 16:24:07 +01:00
Jonas Fonseca
f33d9b004d Fix handling of links using file://localhost/
A simple "update" of Hugo Haas' patch posted for bug 107. This of course
also affects the (undocumented?) feature of file:// refering to the local
directory in that directories named "localhost" can no longer be displayed
using file://localhost. Nobody should do that anyway.
2006-11-06 05:43:48 +01:00
Miciah Dashiel Butler Masters
dfbbde1952 decompress_data: move a comment
This should have been done in commit e441361f2c.
2006-11-05 04:24:48 +00:00
Miciah Dashiel Butler Masters
6f8f41e20d decompress_data: change initial malloc size, drop init variable
Adjust the size of to_read for the initial read instead of setting the init
flag and using that later to check whether to read a smaller amount than
the value in to_read. This also affects the realloc call on the initial
read, which was allocating more memory than necessary (altho this
discrepency would be corrected with the realloc for the next read).
2006-11-05 04:21:52 +00:00
Miciah Dashiel Butler Masters
e441361f2c decompress_data: make the current state more explicit
Introduce and use the local variable state instead of determining the
current state from to_read. Localise to_read to the loop.
2006-11-05 03:42:16 +00:00
Miciah Dashiel Butler Masters
157b08609f decompress_data: remove some unnecessary code 2006-11-05 03:17:30 +00:00
Witold Filipczyk
4bf3e2693b "If-Modified-Since" second approach.
Added document.cache.interval option. When time elapsed since previous access
to the document is less than interval then the document is taken from
the cache. Otherwise the request with filled "If-Modified-Since" and/or
"If-None-Match" header field is sent. By default interval is set to 10 minutes.
This requires the correct time to be set on your machine.
2006-10-26 11:53:30 +02:00
Petr Baudis
9c8fff1100 Merge with /srv/git/elinks.git 2006-10-12 23:44:12 +02:00
Witold Filipczyk
8d6a73646b Commented code related to "If-Modified-Since" (infinite loop). 2006-10-12 14:07:58 +02:00
Petr Baudis
647db326fb Merge with /srv/git/elinks.git 2006-10-12 11:11:05 +02:00
Petr Baudis
f06aed0d8f More verbose assert messages for invalid h1/h2 in POST buffer 2006-10-12 11:10:41 +02:00
Witold Filipczyk
cc6c59d932 Handling If-Modified-Since. 2006-10-08 16:24:47 +02:00
Kalle Olavi Niemitalo
92cb452a9e Rename CONFIG_UTF_8 to CONFIG_UTF8.
The configure script no longer recognizes "CONFIG_UTF_8=yes" lines
in custom features.conf files.  They will have to be changed to
"CONFIG_UTF8=yes".  This incompatibility was deemed acceptable
because no released version of ELinks supports CONFIG_UTF_8.

The --enable-utf-8 option was not renamed.
2006-09-17 16:12:47 +03:00
Jonas Fonseca
b9d66bd9bd Fix compilation on Minix3
- Include arpa/inet.h to get hton* ntoh* functions.
 - Use socklen_t instead of int.
 - Try to define PF_INET to AF_INET if it doesn't exist.

Reported-by: Andy Tanenbaum <ast@cs.vu.nl>
2006-08-22 22:18:00 +02:00
Witold Filipczyk
8615cb529e Added output parameter to the get_filesize_from_RETR. It indicates
whether we ought to add the conn->progress->start to
the conn->est_length. Currently displaying resuming works correctly with
ftp.task.gda.pl and ftp.pld-linux.org.
2006-08-19 09:11:53 +02:00
Witold Filipczyk
77470526ba vsftpd shows total filesize, so I commented out addition.
I know that this is not correct for every server.
Show me ftp sites, where resuming displays wrong filesize.
2006-08-19 00:06:04 +02:00
Witold Filipczyk
5e1a1a215a Fixed about: 2006-08-13 08:58:20 +02:00
Kalle Olavi Niemitalo
ef2f6383c6 do_auth_dialog: Don't claim that the authentication is for HTTP. 2006-08-06 20:02:36 +00:00
Kalle Olavi Niemitalo
ca496aa2dd do_auth_dialog: Fix off-by-one error leading to reads of uninitialized memory.
This bug manifested as a junk character at the end of the text in the
authentication dialog.
2006-08-06 20:02:35 +00:00
Witold Filipczyk
2e818771d0 Made directory listings XML compliant 2006-07-31 13:24:39 +02:00
Laurent MONIN
1136aefb71 Trim trailing whitespaces. 2006-07-27 09:51:10 +02:00
Witold Filipczyk
2a6125e3d0 Merge with utf8. src/document/plain/renderer.c replaced by utf8 version 2006-07-21 13:12:06 +02:00
Laurent MONIN
c2ca89cab1 HTTP DIGEST AUTH: fix wrong sizeof(), patch by Vitaly Lavrov (added to
AUTHORS). Close bug 769.
2006-07-05 15:07:48 +02:00
Witold Filipczyk
1f747b2299 Local file browsing works under Windows. It is done lame way.
In protocol/common.c length of string is known, so pass it
instead of -1 to encode_uri_string.
Introduced encode_win32_uri_string, because there were problems
with : and \ in base href.
2006-07-02 19:20:27 +02:00
Witold Filipczyk
8fa2b8180e s|/|\|g in directory listings under Windows 2006-07-02 16:48:39 +02:00
Witold Filipczyk
c6426b4634 CHAR_DIR_SEP used in directory listings 2006-07-02 16:38:52 +02:00
Witold Filipczyk
3fd1ac87bd STRING_DIR_SEP in file redirects 2006-07-02 09:01:14 +02:00
Miciah Dashiel Butler Masters
888faebaea parse_header_param: better describe behaviour when @ret is NULL
This got lost during merging of Kalle Olavi Niemitalo's patches.
2006-06-23 06:07:22 +00:00
Laurent MONIN
645ee58c83 http_negotiate_get(): only change *is_new on successful allocation. 2006-06-16 16:27:28 +02:00
Laurent MONIN
2217c885b4 http_negotiate: tidy up. 2006-06-16 16:26:20 +02:00
Laurent MONIN
2e0d5aa197 Add forgotten files from negotiate-auth patch. 2006-06-14 20:25:11 +02:00
Laurent MONIN
b373ded19b Trim trailing whitespaces. 2006-06-14 14:46:30 +02:00
Laurent MONIN
4b04a25b32 Support for negotiate-auth, using GSSAPI. It makes possible to
authenticate users by Kerberos. Patch by Karel Zak.
2006-06-14 14:41:59 +02:00
Laurent MONIN
b6e6ac96a3 ftp_process_dirlist(): re-introduce else { ERROR() } part, just drop
#ifdef/#endif.
2006-06-10 01:28:35 +02:00
Laurent MONIN
de2264f712 ftp_process_dirlist(): minor test optiization. 2006-06-10 01:12:38 +02:00
Laurent MONIN
6960fc8feb ftp_process_dirlist(): drop stale debug code, spotted by Miciah. 2006-06-10 00:58:50 +02:00
Miciah Dashiel Butler Masters
14595404d1 ftp_process_dirlist: Rename local variable bufp to line_length. 2006-06-09 21:46:47 +00:00
Miciah Dashiel Butler Masters
71ec83c0de ftp_get_line: Reflow some code. 2006-06-09 21:43:36 +00:00
Miciah Dashiel Butler Masters
2d49225db3 ftp_get_line: Reflow some code. 2006-06-09 21:43:18 +00:00
Miciah Dashiel Butler Masters
e1ea1cf2bb ftp_get_line: Don't update *@len if returning -1. 2006-06-09 21:42:16 +00:00
Miciah Dashiel Butler Masters
ea5b06c329 ftp_process_dirlist: Drop a silly comment. 2006-06-09 21:39:51 +00:00
Miciah Dashiel Butler Masters
4122a97a03 Factor ftp_get_line out of ftp_process_dirlist.
Per Quiznos's suggestion.
2006-06-09 21:38:06 +00:00
Miciah Dashiel Butler Masters
585f7c5f2b ftp_process_dirlist: check for bufl == 0 earlier. 2006-06-09 20:17:57 +00:00
Miciah Dashiel Butler Masters
dafc209c61 Simplify ftp_process_dirlist via memchr. 2006-06-09 20:16:35 +00:00
Miciah Dashiel Butler Masters
8c3d7a8e72 Fix data: protocol
Increment conn->from by the length of the data so that when
abort_connection calls normalize_cache_entry, it doesn't truncate the
cache entry to 0 length.
2006-06-08 17:42:27 +00:00
Kalle Olavi Niemitalo
819b6fab80 parse_header_param stores the string via a pointer parameter.
Its return value is now an enum that lets callers know whether an
error occurred.  However, this commit changes the callers only
minimally, so they do not yet check the return value.
2006-06-05 20:22:53 +00:00
Miciah Dashiel Butler Masters
d6d72a6ff5 Relabel the auth module
As noted by Jonas Fonseca, the auth module is used by FTP as well as HTTP,
so take 'HTTP' out of the name.
2006-06-02 19:08:09 +00:00
Kalle Olavi Niemitalo
d10a489a14 BFU: Mark format strings in struct listbox_ops_messages.
With regular comments in the definition of the structure itself,
and with xgettext:c-format comments in constants of that type,
if xgettext would otherwise guess wrong; so that translators
will know they'll have to double any percent signs they add.
I didn't regenerate PO files, though.
2006-06-02 19:08:09 +00:00
Laurent MONIN
1d3656a317 Pass a pointer to a hash pointer to free_hash() to ensure hash pointer
is NULL on return.
2006-05-31 19:33:36 +02:00
Laurent MONIN
54099f5286 Do not export init_hash(),strhash() and hash_size() anymore, use a
wrapper named init_hash8() instead.
2006-05-31 19:17:01 +02:00
Miciah Dashiel Butler Masters
337958d4e4 Modularise HTTP authentication 2006-05-20 15:01:23 +00:00
Miciah Dashiel Butler Masters
eee3ecdbbc BitTorrent: Remove superfluous check and assignment
unchoke_bittorrent_peer checks and clears peer->remote.choked,
so do not do so in the caller.
2006-05-20 12:13:32 +00:00
Miciah Dashiel Butler Masters
fe07757574 BitTorrent: Remove a superfluous check and assignment
choke_bittorrent_peer checks and sets peer->remote.choked,
so do not do it again in the caller.
2006-05-20 12:13:30 +00:00
Witold Filipczyk
f377e6f4af copiousoutput: only mark /dev/fd/%d as popen data . I reflect if ELinks may
run out of fds
2006-05-09 09:42:00 +02:00
Witold Filipczyk
4dc4ea47f2 copiousoutput: cleanup after copiousoutput handling. Temporary files should
be deleted
2006-05-09 09:36:16 +02:00
Witold Filipczyk
9c3817675f set_nonblocking_fd seems to be superfluous 2006-05-06 08:07:38 +02:00
Witold Filipczyk
c283f8cfd9 Gradual rendering in pager mode. ELinks is almost as good as less.
TODO: cg-log -c | elinks
2006-05-05 21:12:10 +02:00
Witold Filipczyk
e0103c2c68 Drop unnecessary cgi_pipes[2] 2006-05-03 21:46:39 +02:00
Witold Filipczyk
8b77bc6617 enum connection_state instead of int to satisfy tcc 2006-04-05 16:27:16 +02:00
Witold Filipczyk
55bd690b88 Files under /usr/share/doc/ncurses-c++-devel-5.5 (directory with
+ in filename) were unreachable. This is fix for it
2006-04-04 20:21:20 +02:00
Witold Filipczyk
1fc28980d7 Parsing filesize on ftp.task.gda.pl 2006-03-16 22:13:40 +01:00
Pavol Babincak
8b9d06c977 Convert link titles to correct codepage before displaying it on screen.
Don't replace UTF-8 bytes with '*'. Probably there is need to do better
check what will be displayed.

Also get_current_link_title is no longer pretty and trivial. (o:
2006-03-13 01:54:34 +01:00
Kalle Olavi Niemitalo
4217f2c555 Merge with http://elinks.cz/elinks.git 2006-02-18 12:21:47 +02:00
Miciah Dashiel Butler Masters
190259ca22 mem_alloc_align: drop the obj type parameter
Instead use the object itself, i.e., replace typeof(obj) with
typeof(**ptr).
2006-02-17 17:32:59 +00:00
Kalle Olavi Niemitalo
a1f26c1f25 Merge with http://elinks.cz/elinks.git 2006-02-12 17:54:22 +02:00
Miciah Dashiel Butler Masters
daad05c055 Don't check is_in_progress_state before calling cancel_download
With commit 637f1e82e6 ('NET: Merge
change_connection into cancel_download'), cancel_download returns
immediately if the connection is not in a result state, so save some
code by not checking is_in_progress_state before calling cancel_download.
2006-02-12 15:41:21 +00:00
Kalle Olavi Niemitalo
416bd01269 Merge with http://elinks.cz/elinks.git 2006-02-12 00:34:53 +02:00
witekfl
15b52b62e4 REFERRER is back 2006-02-11 19:11:50 +01:00
Petr Baudis
c0f98c34ce Revert witekfl's e723ddaee6
This is utterly silly and breaks plenty of stuff - Witek, you CAN'T append
slashes to all hosts just because some silly referer needs it, everywhere
else we NEED the hosts without slashes!
2006-02-11 17:44:54 +01:00
Kalle Olavi Niemitalo
0066214b47 Merge with http://elinks.cz/elinks.git 2006-02-10 09:15:12 +02:00
witekfl
e723ddaee6 Add slash after host. Required by URI_HTTP_REFERRER_HOST 2006-02-09 22:46:44 +01:00
Jonas Fonseca
4b91866c84 GOPHER: Blast end_gopher_connection which now only wraps abort_connection 2006-02-08 21:47:54 +01:00
Jonas Fonseca
854bb90d88 NET: Move cache entry normalization to abort_connection
It simplifies the code and ensures that stuff like conn->from is properly
updated.
2006-02-08 21:40:08 +01:00
Jonas Fonseca
4bfd40ec10 NNTP: Use state instead of conn->state, since it hasn't been updated yet
Fixes: 1735f96a87
2006-02-08 21:04:19 +01:00
Jonas Fonseca
1735f96a87 FTP, NNTP: Normalize the cache entry before setting the connection state
... so it is normalized when the download callbacks are called.
2006-02-08 20:45:15 +01:00
Kalle Olavi Niemitalo
b1f8756c59 Merge with http://elinks.cz/elinks.git 2006-02-05 17:48:43 +02:00
Jonas Fonseca
3324496b57 NET: Replace change_connection with cancel_download and move_download
This simplifies unqueuing of downloads and makes it more obvious that
the 'change' being performed is to migrate or replace an old download
handle with a new one.
2006-02-03 10:44:28 +01:00
Jonas Fonseca
5bf39bd304 FSP: Check and exit the file 'writer' process if writes to stdout fails
This ensures that the 'writer' process will remove itself when the
main ELinks process for some reason decides to shutdown the connection.
Before the 'writer' process would complete it's task taking up unnecessary
system resources.

This is mostly an issue when fetching big files. Therefore only file
fetching is fixed. FIXME added about also checking return codes for write
associated with directory listing.

Reported-by: zas
2006-02-02 16:29:20 +01:00
Jonas Fonseca
4de26051b9 Ignore test files 2006-01-31 22:23:22 +01:00
Miciah Dashiel Butler Masters
db9768963f Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-30 15:42:03 +00:00
41e8570e64 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-01-30 12:42:40 +01:00
aed26bf002 Introduced CGI module 2006-01-30 08:56:40 +01:00
Jonas Fonseca
ba2b6e633a DIRLIST:Use directory listing initializer in the Gopher protocol module 2006-01-30 02:41:09 +01:00
Jonas Fonseca
94f4b2fd1d DIRLIST: Cleanup macros used in the FTP directory listing 2006-01-30 01:29:40 +01:00
Jonas Fonseca
d8ef7e1b68 DIRLIST: Use directory listing initializer in the FSP protocol module 2006-01-30 01:25:39 +01:00
Jonas Fonseca
b567f6a5db DIRLIST: Use directory listing initializer in the FTP protocol module 2006-01-30 01:25:30 +01:00
Jonas Fonseca
c96cb0bbae DIRLIST: Use directory listing initializer in the file protocol module 2006-01-30 01:25:18 +01:00
Jonas Fonseca
865af9ac4a DIRLIST: Add helper to at start of (HTML) directory listing 2006-01-30 01:22:31 +01:00
Jonas Fonseca
7d1ff4fbf1 Only add ending slash to directory URLs
Not even to directory names. We don't do that for file: or ftp: protocol.

Fixes: af2cc87054
2006-01-29 18:35:59 +01:00
Laurent MONIN
cf429c4ecc FSP: trim trailing whitespaces. 2006-01-29 18:01:48 +01:00
Laurent MONIN
af2cc87054 FSP: display_entry() cleanup, and mark directories by an ending /
in lists.
2006-01-29 18:01:22 +01:00
Laurent MONIN
0c4bc5a362 FSP: reduce code redundancy, introducing display_entry(). 2006-01-29 17:53:26 +01:00
Laurent MONIN
d07cf588bd FSP: reduce code redundancy. 2006-01-29 17:48:09 +01:00
5511c5b748 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-01-29 16:51:11 +01:00
Jonas Fonseca
a236608554 Do not set the content type for FSP files
Simplify commit 8d4f44f2f1, in particular
detecting MIME types for files. It is more consistent to do it the way
it was already done by the session/download code.

Instead, write a NUL byte to stderr when getting FSP files and only set
cache->content_type when the header string is non-empty.

Additionally it also moves close(stderr) after the fsp_error() in the
file handling part of do_fsp() so the error message is shown with the
correct type.
2006-01-29 14:27:14 +01:00
46aae704eb Added slash to base href when directory didn't end with '/' 2006-01-29 13:22:05 +01:00
Miciah Dashiel Butler Masters
5bcb1309da Use enum connection_state
Use enum connection_state instead of int in load_uri,
proxy_uri, get_proxy_worker, and get_proxy_uri. See commit
d18809522e. I hope that satisfies TCC.
2006-01-28 20:21:09 +00:00
Laurent MONIN
5114c9d110 Trim trailing whitespaces. 2006-01-28 01:59:22 +01:00
e8030e09fd Set text/plain for errors 2006-01-26 18:35:58 +01:00
8d4f44f2f1 Content-Type handling 2006-01-26 18:20:13 +01:00
f47daa2291 Use slashes after directories. Blocks are not used where there is only
one instruction
2006-01-26 14:34:11 +01:00
Jonas Fonseca
ba3e4a611d Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-01-21 23:38:15 +01:00
d18809522e Make elinks tcc (tiny C compiler) friendly.
If you want to try tcc use CC=tcc ./configure and make LD=tcc.
I built ELinks with tcc, but ELinks segfaults.
2006-01-21 21:33:23 +01:00
Jonas Fonseca
91e8fdf34b Fix the EPLF FTP parser test to run FreeBSD 2006-01-21 08:28:57 +01:00
Jonas Fonseca
c97b4be9b9 Move SUBDIRS and OBJS defining before their conditional defining 2006-01-18 21:53:13 +01:00
Jonas Fonseca
7f076a8832 Also compile in protocol/common when CGI is enabled 2006-01-18 21:50:43 +01:00
witekfl
095e440270 Used protocol/common.h in CGI 2006-01-18 18:11:29 +01:00
Jonas Fonseca
c7bdf62152 Remove unused fsp_info struct; use sizeof(*table); fix dir entry hiliting 2006-01-17 00:54:06 +01:00
Jonas Fonseca
28fbb9317b Simplify URI string grapping; make dir listing more like FTP; use READ_SIZE 2006-01-17 00:40:27 +01:00
Laurent MONIN
a9907297b4 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-01-17 00:22:40 +01:00
Jonas Fonseca
54863e537f Minor space cleanups; use pid_t; abort_connection() will close_socket() 2006-01-17 00:06:24 +01:00
Laurent MONIN
491654975d Trim trailing whitespaces. 2006-01-16 23:51:02 +01:00
Laurent MONIN
8fe86eac0b Typo fix. 2006-01-16 23:50:34 +01:00