Re: [racket-users] Multipart HTTP requests

2019-01-30 Thread Jon Zeppieri
On Wed, Jan 30, 2019 at 6:46 AM Christopher Lemmer Webber < cweb...@dustycloud.org> wrote: > Jon Zeppieri writes: > > > On Tue, Jan 29, 2019 at 4:17 AM Christopher Lemmer Webber < > > cweb...@dustycloud.org> wrote: > > > >> > >> Any thoughts on how I should move forward? > > > > > > I think that u

Re: [racket-users] Multipart HTTP requests

2019-01-30 Thread Christopher Lemmer Webber
Jon Zeppieri writes: > On Tue, Jan 29, 2019 at 4:17 AM Christopher Lemmer Webber < > cweb...@dustycloud.org> wrote: > >> >> Any thoughts on how I should move forward? > > > I think that using a `data-procedure/c` of a particular sort should allow > you to implement this without needing access to t

Re: [racket-users] Multipart HTTP requests

2019-01-30 Thread Christopher Lemmer Webber
Philip McGrath writes: > I've put up the code I mentioned for email-sending and a proxy server at > https://github.com/LiberalArtist/multipart-writing-examples As noted, these > are not general-purpose solutions to either of those problems—I know of a > bunch of cases I don't cover, and I basicall

Re: [racket-users] Multipart HTTP requests

2019-01-29 Thread Philip McGrath
I've put up the code I mentioned for email-sending and a proxy server at https://github.com/LiberalArtist/multipart-writing-examples As noted, these are not general-purpose solutions to either of those problems—I know of a bunch of cases I don't cover, and I basically only have to use these with tr

Re: [racket-users] Multipart HTTP requests

2019-01-29 Thread Jon Zeppieri
On Tue, Jan 29, 2019 at 4:17 AM Christopher Lemmer Webber < cweb...@dustycloud.org> wrote: > > Any thoughts on how I should move forward? I think that using a `data-procedure/c` of a particular sort should allow you to implement this without needing access to the struct internals or needing to r

Re: [racket-users] Multipart HTTP requests

2019-01-29 Thread Neil Van Dyke
HTTP multipart reading is pretty easy to implement.  You just want to be careful about space&time performance -- not only because you might want lots-and-lots of this processing going on on each server (and the costs add up), but because the individual parts are quite often large (for the purpo

Re: [racket-users] Multipart HTTP requests

2019-01-29 Thread George Neuner
On 1/29/2019 8:11 AM, Matthew Flatt wrote: At Tue, 29 Jan 2019 04:17:53 -0500, Christopher Lemmer Webber wrote: > Any thoughts on how I should move forward? Has anyone else written a > multipart library I don't know about, for instance? Is that the same as MIME's multipart as used in email? I

Re: [racket-users] Multipart HTTP requests

2019-01-29 Thread Hendrik Boom
On Tue, Jan 29, 2019 at 04:34:49AM -0500, Philip McGrath wrote: > I don't think there's a multipart-writing library yet, and it would be a > great thing to have. > > I've written little multipart-writing functions for a small proxy server > built on `http-sendrecv/url` and for sending email using

Re: [racket-users] Multipart HTTP requests

2019-01-29 Thread Matthew Flatt
At Tue, 29 Jan 2019 04:17:53 -0500, Christopher Lemmer Webber wrote: > Any thoughts on how I should move forward? Has anyone else written a > multipart library I don't know about, for instance? Is that the same as MIME's multipart as used in email? If so, see http://docs.racket-lang.org/net/mi

Re: [racket-users] Multipart HTTP requests

2019-01-29 Thread Christopher Lemmer Webber
I see... yeah, I thought about going this route but the reason it didn't seem particularly "robust" to me is that I would have to read the entire object into memory at once before passing it in as bytes. IMO it would be better to have the option to provide ports with file data so the data could be

Re: [racket-users] Multipart HTTP requests

2019-01-29 Thread Philip McGrath
I don't think there's a multipart-writing library yet, and it would be a great thing to have. I've written little multipart-writing functions for a small proxy server built on `http-sendrecv/url` and for sending email using `net/sendmail` with html and text/plain alternatives. I'm happy to share c

[racket-users] Multipart HTTP requests

2019-01-29 Thread Christopher Lemmer Webber
I'm looking to do multipart HTTP requests in Racket, though it looks like there's no support at the moment. I thought I might add a utility using the net/http-client library, starting with making an adjusted http-conn-send! function. However, the http-conn-(host/port/etc) struct accessors aren't