Am 26.07.2013 14:59, schrieb Manu Evans:

On Fri, 26 Jul 2013 12:43:54 GMT, Manu Evans wrote:

And now a new issue that has just come up...

My application that makes HTTP requests seems to lock up vibe.d. It seems to sit there waiting for more data over the socket, even though it's received all that it's going to.
Then my app disconnects the socket and vibe.d dies inside:

auto reqln = cast(string)stream.readLine(MaxHTTPHeaderLineLength, "\r\n", alloc);

The thing that caught my eye immediately was the "\r\n" thing. That's not the HTTP standard is it?
My app sends the HTTP request with "\n" separating the lines. Other HTTP servers accept my requests just fine, but vibe.d locks up... weird.

I tried changing my app to use "\r\n" line separators instead of "\n", and vibe.d started working as expected...

what's the deal?

Again, my bad. I just reviewed the spec, it does say '\r\n' >_<
I'm amazed I got away with this for so long. Apparently it's not a very rigid spec.
At least Google AppEngine and Apache support lone '\n' separators.

I have to be very grateful that you made that mistake, though! ;) I've
always wondered why I sometimes get requests that resulted in a read
timeout at exactly that place (without any means to reproduce that in a
debugger). I guess now I have an explanation.

It will be slightly tricky to support a bare '\n', because readLine
builds on top of a generic readUntil function, which would need to be
modified to support multiple search terms. I'll open a ticket for now.