Re: [web-devel] ALPHA: http-types 0.1

Writing this from my phone, so I'll be brief.
I'm OK with the name CIByteString, I just thought the Http would clarify
that this is not safe for different encodings. But I can change this.
Parsing/rendering sounds like a good idea. I will probably use different
function names, but you can set up aliases in wai-extra, right?
Headers are already there, no? You're confusing me.
Thanks for the nice feedback!
Aristid
"sent from my Android"
Am 04.02.2011 07:09 schrieb "Michael Snoyman"
OK, I uploaded a fixed version: http://hackage.haskell.org/pack...

On Fri, Feb 4, 2011 at 10:16 AM, Aristid Breitkreuz
Writing this from my phone, so I'll be brief.
I'm OK with the name CIByteString, I just thought the Http would clarify that this is not safe for different encodings. But I can change this.
Parsing/rendering sounds like a good idea. I will probably use different function names, but you can set up aliases in wai-extra, right?
Yes, for functions I don't care what you name things. It's specifically data constructors that breaks backwards compatibility.
Headers are already there, no? You're confusing me.
I was talking about the semi-exhaustive list of headers that people often request, eg hdrAccept = "Accept", hdrContentType = "Content-Type", etc. It was brought up in the original thread.
Thanks for the nice feedback!
Aristid "sent from my Android"
Am 04.02.2011 07:09 schrieb "Michael Snoyman"
: Alright, everything seems fine to me. Some more comments:
* Besides the fact that I think HttpCIByteString is too verbose, it presents another problem: I cannot transparently switch over to it in WAI and http-enumerator. If you kept the same name (CIByteString), I could simply switch over to your version without any breaking changes. * I like methodGet et al. * Do you want to consider some parsing functions? I can provide you the code. Some things I would imagine would be: * parseQueryString :: ByteString -> [(ByteString, Maybe ByteString)] (I'm not sure if in practice anyone cares about the Maybe btw, but you are right that it is more theoretically correct) * renderQueryString :: [(ByteString, Maybe ByteString)] -> ByteString * parsePath :: ByteString -> [String], which would do all splitting-on-slash, percent decoding and UTF-8 decoding * renderPath :: [String] -> ByteString, which would be the reverse of parsePath * renderPathQuery :: [String] -> [(ByteString, ByteString)] -> ByteString * parseHttpAccept :: ByteString -> [ByteString] * Are you planning on adding headers as well?
Basically, feel free to raid Network.Wai.Parse[1].
[1] http://hackage.haskell.org/packages/archive/wai-extra/0.3.1/doc/html/Network...
On Fri, Feb 4, 2011 at 12:23 AM, Aristid Breitkreuz
wrote: OK, I uploaded a fixed version: http://hackage.haskell.org/pack...

Sure, will do both.
How comprehensive should the header list be?
Am 04.02.2011 11:05 schrieb "Michael Snoyman"
Writing this ... Yes, for functions I don't care what you name things. It's specifically data constructors that breaks backwards compatibility.
Headers are already there, no? You're confusing me. I was talking about the semi-exhaustive list of headers that people often request, eg hdrAccept = "Accept", hdrContentType = "Content-Type", etc. It was brought up in the original thread.
Thanks for the nice feedback!
Aristid "sent from my Android"
Am 04.02.2011 07:09 schrie...

I have no idea how comprehensive. My best advice would be to add the
first ones that come to mind and let users tell you what's missing.
On Fri, Feb 4, 2011 at 12:15 PM, Aristid Breitkreuz
Sure, will do both.
How comprehensive should the header list be?
Am 04.02.2011 11:05 schrieb "Michael Snoyman"
: On Fri, Feb 4, 2011 at 10:16 AM, Aristid Breitkreuz
wrote: Writing this ...
Yes, for functions I don't care what you name things. It's specifically data constructors that breaks backwards compatibility.
Headers are already there, no? You're confusing me.
I was talking about the semi-exhaustive list of headers that people often request, eg hdrAccept = "Accept", hdrContentType = "Content-Type", etc. It was brought up in the original thread.
Thanks for the nice feedback!
Aristid "sent from my Android"
Am 04.02.2011 07:09 schrie...
participants (2)
-
Aristid Breitkreuz
-
Michael Snoyman