Commit Graph

426 Commits

Author SHA1 Message Date
Matthew Flatt
dbe90fa15e add optional newline argument to `base64-encode'
original commit: a12f9831a3
2012-02-21 06:14:44 -07:00
Matthew Flatt
e6d06d9bd5 net/mime: allow any subtype, exns as exn:fail subtypes; doc fixes
original commit: 7153fbd4d5
2012-01-08 12:14:51 -07:00
Eli Barzilay
6feb946842 Minor typo in recent new regexp.
original commit: 3fcd3c04d5
2011-12-28 21:07:25 -05:00
Jay McCarthy
83d3a6d984 Synchronizable events from Tom McNulty
original commit: ae31b19168
2011-12-26 14:33:07 -07:00
Eli Barzilay
97f880fb94 More fixes and improvements to `net/unihead'.
* In base64 encoding remove all newlines from the encoded result, avoids
  getting an invalid result.

* In qp encoding:
  - replace all spaces by underlines, not just the first (looks like a
    typo in the previous code)
  - encode "?"s and "_"s too, as required for this encoding
  - remove soft newlines (again, avoid an invalid result)

* Use `regexp-replace*' to encode the parts between the lines.  Besides
  making the code simpler, it fixes a bug in the previous code where
  multiple lines would each get encoded and the results concatenated
  without the newlines or any other whitespace.

* When the string to be encoded is longer than 70 characters, split and
  encode the sub-parts, then concatenate the encodings with a "\n "
  separator.  This is done as a poor attempt to follow the line length
  limits specified in rfc2047, or more concretely, to avoid sendmail's
  "!\n " splitting.

original commit: ed8e3367d4
2011-12-21 14:46:13 -05:00
Eli Barzilay
b232bb25ac Fixes and improvements to `net/unihead'.
* Use `re:non-ascii' to look for a non-ascii character => faster.

* Use either CR or LF for a newline, not just LF.

* Use `regexp-replace*' to encode the parts between the lines.  Besides
  making the code simpler, it fixes a bug in the previous code where
  multiple lines would each get encoded and the results concatenated
  without the newlines or any other whitespace.

original commit: 188c65661d
2011-12-21 14:46:13 -05:00
Eli Barzilay
42503882a8 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.

original commit: ddcab952f7
2011-12-20 16:13:13 -05:00
Eli Barzilay
609cd0e81b 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.

original commit: f9d07d8400
2011-12-20 15:53:40 -05:00
Jay McCarthy
1d9be26746 Fixes PR9965 and a missing doc xref
original commit: 12580337f2
2011-12-07 06:23:25 -07:00
Jay McCarthy
cce647bd8f Revert "Forgot to include doc change"
This reverts commit ccd5061c87.

original commit: 37a7e0a2e1
2011-11-23 11:13:21 -07:00
Jay McCarthy
ad78dea87a Revert "This fixes 10497 and potentially breaks programs that assume the query of a URL is always a list. I have fixed uses in the Web Server, which I expect is the major thing affected, but much more could be. Therefore I am skeptical this is a good idea just for the representation of ?. So, I'd like other people to review the change and let me know if they think I should revert it."
This reverts commit 7f9818bb3e.

original commit: 41e04b33da
2011-11-23 11:13:20 -07:00
Jay McCarthy
02759a74df Forgot to include doc change
original commit: ccd5061c87
2011-11-23 10:59:54 -07:00
Jay McCarthy
26326b6235 This fixes 10497 and potentially breaks programs that assume the query of a URL is always a list. I have fixed uses in the Web Server, which I expect is the major thing affected, but much more could be. Therefore I am skeptical this is a good idea just for the representation of ?. So, I'd like other people to review the change and let me know if they think I should revert it.
original commit: 7f9818bb3e
2011-11-23 10:59:54 -07:00
Rodolfo Carvalho
7631e920bc Add missing word 'one', clarify behavior of the 'semi-or-amp mode.
original commit: f43405543a
2011-10-17 13:18:17 -04:00
Robby Findler
8f9006e82e add support for redirections to get-pure-port and add get-pure-port/headers
original commit: 11a3d9b0ac
2011-10-03 13:21:30 -05:00
Robby Findler
853e6d7827 adjust the "Transfer-Encoding: chunked" code to re-use bytes more
agressively

original commit: 1fa6129afc
2011-10-03 13:21:29 -05:00
Jon Zeppieri
1431714123 Moved `net/url' code from unit to module.
original commit: d44a7a480a
2011-09-05 15:22:39 -04:00
Jon Zeppieri
d0f1f6fa23 Moved `net/uri-codec' code from unit to module.
original commit: 3f69d4c8e8
2011-09-05 15:22:39 -04:00
Jon Zeppieri
e143a3af4f Moved `net/smtp' code from unit to module.
original commit: 647d3fb365
2011-09-05 15:22:39 -04:00
Jon Zeppieri
3e399465aa Moved `net/sendmail' code from unit to module.
original commit: 9ab674fd0c
2011-09-05 15:22:38 -04:00
Jon Zeppieri
eadd27b8d0 Moved `net/qp' code from unit to module.
original commit: d034297c76
2011-09-05 15:22:38 -04:00
Jon Zeppieri
185aa9c20a Moved `net/pop3' code from unit to module.
original commit: 54deaac318
2011-09-05 15:22:38 -04:00
Jon Zeppieri
6728cc4597 Moved `net/nntp' code from unit to module.
original commit: df5fef0c95
2011-09-05 15:22:38 -04:00
Jon Zeppieri
96dfe15d91 Moved `net/mime' code from unit to module.
original commit: 67ca846fd9
2011-09-05 15:22:38 -04:00
Jon Zeppieri
120ab7af22 Moved `net/imap' code from unit to module.
original commit: 9ae3840211
2011-09-05 15:22:38 -04:00
Jon Zeppieri
944338b0f6 Moved `net/head' code from unit to module.
original commit: 095ee4e007
2011-09-05 15:22:38 -04:00
Jon Zeppieri
1a0336d99b Moved `net/ftp' code from unit to module.
original commit: 03237c06f2
2011-09-05 15:22:38 -04:00
Jon Zeppieri
e16b530ded Moved `net/dns' code from unit to module.
original commit: a0eac7ac5c
2011-09-05 15:22:38 -04:00
Jon Zeppieri
2add6a09dc Moved `net/cgi' code from unit to module.
original commit: a5222b9481
2011-09-05 14:17:36 -04:00
Jon Zeppieri
932ab5feab Moved `net/base64' code from unit to module.
original commit: 0104198875
2011-09-05 14:13:04 -04:00
Matthew Flatt
55e9e0ddd7 trivial doc fix
original commit: 1b0abe85c7
2011-08-19 12:52:19 -06:00
Jay McCarthy
9dfe50c8cf De-unitizing cookies and making the serializable
original commit: b207f1051a
2011-08-15 10:06:21 -06:00
Eli Barzilay
c75da5fd97 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).

original commit: d61eb53686
2011-08-15 07:50:04 -04:00
Eli Barzilay
62e93cf2a4 Heavily revise this test.
- Simplify code
- Remove bogus leftover (tests) in the end
- Resolve deadlock that resulted from using `tcp-abandon-port' in
  `net/ftp'
- Actually there's no need for threads, probably because of small size
  of data, so keep it.
- Use scribble syntax instead of here-strings, and move the text out of
  the way.

original commit: f297c98c1a
2011-08-15 02:37:39 -04:00
Matthew Flatt
b342b9b044 fix doc typos
original commit: be0260792e
2011-08-10 08:28:13 -06:00
Eli Barzilay
c2e489dc78 Add an optional path argument to `ftp-directory-list'.
original commit: 5a7ddd6611
2011-08-05 01:14:16 -04:00
Eli Barzilay
6a6f849c5c 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'.)

original commit: 6a1336e75e
2011-08-05 01:14:16 -04:00
Eli Barzilay
55405d017b 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.

original commit: 234015b34d
2011-08-05 01:14:16 -04:00
Eli Barzilay
844402b102 Remove all mentions of `locale' from the docs.
It's utf-8 now, but that's the default in the docs anyway.

original commit: 99d48abcf3
2011-08-05 01:14:16 -04:00
Eli Barzilay
d6dad89d3a ".ss" -> ".rkt" scan done.
original commit: 3157955d40
2011-07-02 10:37:53 -04:00
Ryan Culpepper
205c99022d docs reorganization
added tutorial, racket categories
  relabeled some other categories
  normalized manual names: de-bolded, changed some names

original commit: 1b702a2ae3
2011-07-01 17:16:53 -06:00
Eli Barzilay
d3a49471f7 A long overdue scan to eliminate files without terminating newlines.
(DrRacket should really do that.)

original commit: 40124a0619
2011-06-28 02:01:41 -04:00
Eli Barzilay
15cd89c4af Finish converting scheme' -> racket'.
Everything compiles fine now even if the compatibility bindings are
gone.

original commit: a38f384a00
2011-06-28 00:45:38 -04:00
Eli Barzilay
333c1506a9 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.

original commit: ac26fe7554
2011-06-25 04:08:47 -04:00
Eli Barzilay
a8092eea36 Correction to the small correction
original commit: 8990177c75
2011-06-20 16:45:33 -04:00
Eli Barzilay
54f8c69298 Small correction
original commit: f08ce64e07
2011-06-20 15:41:57 -04:00
Matthew Flatt
f9c5f5dbe3 adjust and document net/url HTTPS support
original commit: f3da5f7fd8
2011-06-20 08:00:43 -06:00
Eli Barzilay
dfc0ca2908 Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)

original commit: debd1f9f1e
2011-06-20 04:27:14 -04:00
Matthew Flatt
7c644a8eac "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.

original commit: f34a31cac9
2011-06-17 18:54:43 -06:00
Eli Barzilay
a8ef109b6e Disable xdg-open, since it seems like it suffers from the same problem
gnome-open does.

Relevant (but not really a solution) to PR 11869.

original commit: 020946cb2a
2011-04-23 08:51:05 -04:00