Commit Graph

86 Commits

Author SHA1 Message Date
Matthew Flatt
e0de33a005 net/ftp: make progress proc keyword, change progress protocol
The revised protocol for a progress procedure doesn't create
the thread automatically, and it provides an event to indicate
when the progress count changes.
2012-12-13 07:45:26 -07:00
Chenxiao
4cc287f7e5 Improve ftp client. Add upload, progress monitor and something else. 2012-12-13 07:09:04 -07:00
Eli Barzilay
14d8c8b5a5 Newlines at EOFs. 2012-11-06 14:07:15 -05:00
Danny Yoo
dcf4d8b040 adding close-eval at the end of scribble files that have a toplevel evaluator 2012-11-01 15:32:53 -06:00
John Clements
1f02a0a8b8 exposed mapping for unreserved characters 2012-11-01 12:38:09 -07:00
Jay McCarthy
a1e855a035 adding an optional argument to get-pure-port/headers 2012-08-16 14:47:09 -06:00
Robby Findler
86572cc8c3 adjust the contract on string->url so that it actually catches all of
the errors that would be signalled by the body. also, remove
url-regexp from the exports (it was only recently added)

I believe this eliminates two of Eli's concerns:

  - the contract is no longer so painful to read

  - the performance is more reasonable.

Specifically, for the performance, here are the times I see to call
string->url on "http://www.racket-lang.org":

no contract: any/c
cpu time: 564 real time: 566 gc time: 3

weak contract: (-> (or/c string? bytes?) url?)
cpu time: 590 real time: 590 gc time: 3

strong, regexp-based contract:
(-> (or/c (not/c #rx"^([^:/?#]*):") #rx"^[a-zA-Z][a-zA-Z0-9+.-]*:") url?)
cpu time: 632 real time: 633 gc time: 5

This appears to be about a 10% slowdown for the regexp-based contract
over the weaker contract.

related to PR 12652
2012-03-29 19:31:32 -05:00
Robby Findler
fdf3fa6492 apply Andy's diff (and adjust the documentation correspondingly)
closes PR 12652
2012-03-27 12:21:17 -05:00
Eli Barzilay
818e434c60 Remove no-longer used net/cgi exceptions. 2012-03-16 02:55:35 -04:00
Matthew Flatt
537f194c4e net/imap: add TLS support
Based on a patch from Thomas Spurden
2012-03-10 10:47:22 -07:00
Matthew Flatt
a12f9831a3 add optional newline argument to `base64-encode' 2012-02-21 06:14:44 -07:00
Matthew Flatt
7153fbd4d5 net/mime: allow any subtype, exns as exn:fail subtypes; doc fixes 2012-01-08 12:14:51 -07:00
Jay McCarthy
ae31b19168 Synchronizable events from Tom McNulty 2011-12-26 14:33:07 -07:00
Eli Barzilay
ddcab952f7 Quote sender, subject, and recipients strings if needed.
There might be existing uses of `net/sendmail' that did this quoting
since this code didn't do so.  Such uses would continue to work fine,
since quoted strings would already be plain ASCII, so a second quoting
would leave it as is.

Note that the quoted strings are also used as command line arguments.
It seems that sendmail deals with these all fine when they appear as
command line arguments.  This means that any valid email address format
can be used, not just "raw" emails.  If there are some sendmails that
don't do this, then it would be better to add a `-t' flag to let
sendmail parse the text in the message.

One caveat (not a new one): since they're passed as is, it is possible
to use two emails in a single string, as in "a@b.com, c@d.com".  This
could lead to obvious problems if someone uses "Bar, Foo <foo@bar.org>"
instead of "\"Bar, Foo\" <foo@bar.org>".  (Using a `-t' to parse the
content won't help with that...)  The only way to avoid this would be to
parse the emails and quote the name part if needed.  But that's a much
hairier piece of code.
2011-12-20 16:13:13 -05:00
Eli Barzilay
f9d07d8400 Revise `net/sendmail'.
* Move the `X-Mailer' header to the top, so that the interesting headers
  are all together at the bottom (the top gets littered by server
  headers anyway).

* Use `subprocess' directly (`process*' wasn't really doing anything
  more than that).

* Allow the sender to be `#f', leaving the header out.  This makes all
  sendmails that I've used use the username that is running the process.

* Just search for a sendmail program: don't barf on windows, so it can
  be used in case there is a sendmail.exe executable there.

* Remove `no-mail-recipients' to make it in-line with other racket code
  that doesn't raise super-specific exceptions.

* Use port counting instead of doing the counts manually, much simpler
  code.
2011-12-20 15:53:40 -05:00
Jay McCarthy
12580337f2 Fixes PR9965 and a missing doc xref 2011-12-07 06:23:25 -07:00
Jay McCarthy
37a7e0a2e1 Revert "Forgot to include doc change"
This reverts commit ccd5061c87.
2011-11-23 11:13:21 -07:00
Jay McCarthy
ccd5061c87 Forgot to include doc change 2011-11-23 10:59:54 -07:00
Rodolfo Carvalho
f43405543a Add missing word 'one', clarify behavior of the 'semi-or-amp mode. 2011-10-17 13:18:17 -04:00
Robby Findler
11a3d9b0ac add support for redirections to get-pure-port and add get-pure-port/headers 2011-10-03 13:21:30 -05:00
Jon Zeppieri
d44a7a480a Moved `net/url' code from unit to module. 2011-09-05 15:22:39 -04:00
Jon Zeppieri
3f69d4c8e8 Moved `net/uri-codec' code from unit to module. 2011-09-05 15:22:39 -04:00
Jon Zeppieri
647d3fb365 Moved `net/smtp' code from unit to module. 2011-09-05 15:22:39 -04:00
Jon Zeppieri
9ab674fd0c Moved `net/sendmail' code from unit to module. 2011-09-05 15:22:38 -04:00
Jon Zeppieri
d034297c76 Moved `net/qp' code from unit to module. 2011-09-05 15:22:38 -04:00
Jon Zeppieri
54deaac318 Moved `net/pop3' code from unit to module. 2011-09-05 15:22:38 -04:00
Jon Zeppieri
df5fef0c95 Moved `net/nntp' code from unit to module. 2011-09-05 15:22:38 -04:00
Jon Zeppieri
67ca846fd9 Moved `net/mime' code from unit to module. 2011-09-05 15:22:38 -04:00
Jon Zeppieri
9ae3840211 Moved `net/imap' code from unit to module. 2011-09-05 15:22:38 -04:00
Jon Zeppieri
095ee4e007 Moved `net/head' code from unit to module. 2011-09-05 15:22:38 -04:00
Jon Zeppieri
03237c06f2 Moved `net/ftp' code from unit to module. 2011-09-05 15:22:38 -04:00
Jon Zeppieri
a0eac7ac5c Moved `net/dns' code from unit to module. 2011-09-05 15:22:38 -04:00
Jon Zeppieri
a5222b9481 Moved `net/cgi' code from unit to module. 2011-09-05 14:17:36 -04:00
Jon Zeppieri
0104198875 Moved `net/base64' code from unit to module. 2011-09-05 14:13:04 -04:00
Matthew Flatt
1b0abe85c7 trivial doc fix 2011-08-19 12:52:19 -06:00
Eli Barzilay
d61eb53686 Lots of documentation formatting.
Started as fixing misindented definitions, then more indentations, then
a bunch of similar things (square brackets, huge spaces at end-of-lines,
etc).
2011-08-15 07:50:04 -04:00
Matthew Flatt
be0260792e fix doc typos 2011-08-10 08:28:13 -06:00
Eli Barzilay
5a7ddd6611 Add an optional path argument to `ftp-directory-list'. 2011-08-05 01:14:16 -04:00
Eli Barzilay
6a1336e75e Return a file size string when possible.
This takes the advice from
  http://files.stairways.com/other/ftp-list-specs-info.txt
further: search for the date by an explicit occurrence of a known month
name.  This means that we won't see files with bad names (they'd be
filtered out of the result), but the filtered out entries are ones that
would not be usable with `ftp-make-file-seconds'.

When the month is found, and the entry is a file, look for a number
preceding the month, and if found, return it as the file size string.
This is a minor change in the API.  (But it's probably better to either
revise it further, or eventually make it irrelevant by exposing the
interesting functionality via `net/url'.)
2011-08-05 01:14:16 -04:00
Eli Barzilay
234015b34d Make `ftp-make-file-seconds' use a correct year instead of 2002.
This function was using 2002 when there's no year...  Updated it to use
the last occurrence of the guessed date, as described at
  http://files.stairways.com/other/ftp-list-specs-info.txt

This function still looks pretty bogus -- the RFC does *not* say
anything about the format of response to `LIST', so it's whatever
semi-random thing the server does.  (The above link looks like an
attempt to fix it, but I didn't see anything more official than that.)
From some looking around, it looks like ftp clients just try a bunch of
patterns against the text.  Add also warnings in the documentation about
this.
2011-08-05 01:14:16 -04:00
Eli Barzilay
99d48abcf3 Remove all mentions of `locale' from the docs.
It's utf-8 now, but that's the default in the docs anyway.
2011-08-05 01:14:16 -04:00
Ryan Culpepper
1b702a2ae3 docs reorganization
added tutorial, racket categories
  relabeled some other categories
  normalized manual names: de-bolded, changed some names
2011-07-01 17:16:53 -06:00
Eli Barzilay
a38f384a00 Finish converting scheme' -> racket'.
Everything compiles fine now even if the compatibility bindings are
gone.
2011-06-28 00:45:38 -04:00
Eli Barzilay
ac26fe7554 A ton of @scheme*' -> @racket*' and related updates.
Also, updates some of the mzlib files to point at `racket/*' libraries
rather than to `scheme/*' ones.
2011-06-25 04:08:47 -04:00
Eli Barzilay
8990177c75 Correction to the small correction 2011-06-20 16:45:33 -04:00
Eli Barzilay
f08ce64e07 Small correction 2011-06-20 15:41:57 -04:00
Matthew Flatt
f3da5f7fd8 adjust and document net/url HTTPS support 2011-06-20 08:00:43 -06:00
Eli Barzilay
debd1f9f1e Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)
2011-06-20 04:27:14 -04:00
Matthew Flatt
f34a31cac9 "under <platform>" -> "on <platform>"; "X" -> "Unix"
I originally picked "under" as the preposition to go before
 a platform name, but obviously you should build "on" a
 platform, and "under" suddenly annoys me. The choice of "on"
 is now codified in the documentation style guide. Meanwhile,
 "Unix" insted of "X" seems more clear and consistent in the
 `racket/gui' docs.

 More usefully, this patch also fixes a few out-of-date
 platform-specific claims.
2011-06-17 18:54:43 -06:00
Jay McCarthy
823da4321f Expanding documentation and doing some renaming/providing 2010-12-07 15:08:36 -07:00