Commit Graph

303 Commits

Author SHA1 Message Date
Asumu Takikawa
e8bd0b51c6 Fix net/dns contracts
original commit: 14c77c39d2
2013-03-01 00:48:11 -05:00
Asumu Takikawa
ad2b0c6587 Add contracts to net/dns functions.
original commit: 9d08d69d07
2013-03-01 00:05:40 -05:00
Eli Barzilay
ee16347918 Improve comment.
original commit: 46894e0cc6
2013-02-19 00:22:47 -05:00
Matthew Flatt
b2e68957cd net/ftp: put temp file for download in directory of destination
original commit: f1b4c86519
2013-02-14 13:03:58 -07:00
Jay McCarthy
39f5f77fd4 Fixing PR13374
original commit: 921456f3ad
2012-12-17 16:28:46 -07:00
Matthew Flatt
e8f889eb05 net/url: add `current-url-encode-mode'
Changing `current-url-encode-mode' from 'recommended to 'unreserved
causes `url->string' to encode !, *, ', (, and ) using %, which
can avoid confusing some parsers.

See also https://github.com/plt/racket/pull/198

original commit: b8b8260379
2012-12-17 06:56:38 -07:00
Matthew Flatt
8a061420d0 net/uri-codec: added `uri-path-segment-unreserved-encode'
original commit: 3d1f1289ef
2012-12-17 06:32:59 -07:00
Chen Xiao
95d818431b A tiny bug in documents of ftp
original commit: a04ae51f64
2012-12-17 05:45:40 -07:00
Matthew Flatt
a951303303 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.

original commit: e0de33a005
2012-12-13 07:45:26 -07:00
Chenxiao
d668029836 Improve ftp client. Add upload, progress monitor and something else.
original commit: 4cc287f7e5
2012-12-13 07:09:04 -07:00
Philippe Mechai
51f0506e7e Added path->url tests for directory paths
This check that no regression was introduced with 733d95b.

original commit: 201534b7ad
2012-11-27 08:46:40 -07:00
Matthew Flatt
0731559f69 net/imap: log to an 'imap logger
original commit: e4e4d544f5
2012-11-23 18:44:51 -07:00
Eli Barzilay
91b048020e Newlines at EOFs.
original commit: 14d8c8b5a5
2012-11-06 14:07:15 -05:00
Danny Yoo
e023d133e7 adding close-eval at the end of scribble files that have a toplevel evaluator
original commit: dcf4d8b040
2012-11-01 15:32:53 -06:00
John Clements
7c864d188f exposed mapping for unreserved characters
original commit: 1f02a0a8b8
2012-11-01 12:38:09 -07:00
Jay McCarthy
191874f50f second attempt at removing reliance on tcp. available has been greatly simplified because it relied on the behavior the thread.rktl test is actually testing
original commit: f16e76ca32
2012-10-26 15:26:39 -06:00
Jay McCarthy
7d47105aac Test localhost tcp before running echo server test
original commit: 552fe0f755
2012-10-23 11:28:27 -06:00
Jay McCarthy
eeace01d3b changing tests for environments where listen fails
original commit: 09dd60789a
2012-10-19 15:24:20 -06:00
Jay McCarthy
d9f2ed0abc adding an optional argument to get-pure-port/headers
original commit: a1e855a035
2012-08-16 14:47:09 -06:00
Matthew Flatt
bf4ad3fdb6 move commented-out tests to `test' submodule
original commit: c747af21e3
2012-07-15 10:32:33 -06:00
Eli Barzilay
45ee870f98 Streamline more test suits.
original commit: 6260b4c239
2012-05-24 11:27:13 -04:00
Eli Barzilay
c33561e005 A bunch of fprintf' -> eprintf' conversions (and a few related things).
original commit: 17090fca4f
2012-05-06 12:06:00 -04:00
Robby Findler
51cf8696b3 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

original commit: 86572cc8c3
2012-03-29 19:31:32 -05:00
Robby Findler
1b243ce46b apply Andy's diff (and adjust the documentation correspondingly)
closes PR 12652

original commit: fdf3fa6492
2012-03-27 12:21:17 -05:00
Eli Barzilay
db82f0dd43 Remove no-longer used net/cgi exceptions.
original commit: 818e434c60
2012-03-16 02:55:35 -04:00
Matthew Flatt
51972b8036 net/imap: add TLS support
Based on a patch from Thomas Spurden

original commit: 537f194c4e
2012-03-10 10:47:22 -07:00
Matthew Flatt
43ad58579f net/smtp: fix auth encoding to not add extra CRLFs
Closes PR 12501

original commit: b656219f8a
2012-02-21 06:14:44 -07:00
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