September 19, 2016 Re: vibe.d maxRequestSize | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris | On 9/19/16 1:34 PM, Chris wrote: > On Monday, 19 September 2016 at 16:55:05 UTC, Steven Schveighoffer wrote: > >> >> >> Hm... you don't get a full stack trace? Hard to tell what max_bytes >> should be, it defaults to ulong.max, so no way you are exhausting >> that. Without knowing where readUntilSmall is called, it's hard to >> diagnose. >> >> -Steve > > I didn't want to litter the thread, here it is: > > 400 - Bad Request > > Bad Request > > Internal error information: > object.Exception@../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/operations.d(349): > Reached maximum number of bytes while searching for end marker. > ---------------- > /home/chris/.dvm/compilers/dmd-2.071.1/linux/bin/../../src/phobos/std/exception.d:405 > pure @safe void > std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, > const(char[])) [0x8f11a7] > /home/chris/.dvm/compilers/dmd-2.071.1/linux/bin/../../src/phobos/std/exception.d:363 > pure @safe bool std.exception.enforce!(Exception, bool).enforce(bool, > lazy const(char)[], immutable(char)[], ulong) [0x8f112a] > .../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/operations.d:348 > void > vibe.stream.operations.readUntilSmall!(vibe.utils.array.AllocAppender!(ubyte[], > ubyte).AllocAppender).readUntilSmall(vibe.core.stream.InputStream, ref > vibe.utils.array.AllocAppender!(ubyte[], ubyte).AllocAppender, > const(ubyte[]), ulong) [0xb06b00] > .../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/operations.d:137 > void > vibe.stream.operations.readUntil!(vibe.utils.array.AllocAppender!(ubyte[], > ubyte).AllocAppender).readUntil(vibe.core.stream.InputStream, ref > vibe.utils.array.AllocAppender!(ubyte[], ubyte).AllocAppender, > const(ubyte[]), ulong) [0xb06a1f] > .../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/operations.d:53 > void > vibe.stream.operations.readLine!(vibe.utils.array.AllocAppender!(ubyte[], ubyte).AllocAppender).readLine(vibe.core.stream.InputStream, > ref vibe.utils.array.AllocAppender!(ubyte[], ubyte).AllocAppender, > ulong, immutable(char)[]) [0xb069c8] > .../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/operations.d:39 > ubyte[] > vibe.stream.operations.readLine!().readLine(vibe.core.stream.InputStream, ulong, > immutable(char)[], vibe.utils.memory.Allocator) [0xb06984] > .../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/http/server.d:1861 > void > vibe.http.server.parseRequestHeader(vibe.http.server.HTTPServerRequest, > vibe.core.stream.InputStream, vibe.utils.memory.Allocator, ulong) > [0xb5e827] Here is the culprit: https://github.com/rejectedsoftware/vibe.d/blob/0.7.29/source/vibe/http/server.d#L1861 And the definition of MaxHTTPHeaderLineLength is: https://github.com/rejectedsoftware/vibe.d/blob/0.7.29/source/vibe/http/server.d#L1861 4096 bytes. I'm not super-familiar with HTTP protocol requirements, but a further diagnosis of your net traffic may reveal that your browser is doing something unorthodox, or vibe needs to adjust here. -Steve |
September 19, 2016 Re: vibe.d maxRequestSize | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Monday, 19 September 2016 at 17:54:05 UTC, Steven Schveighoffer wrote:
> On 9/19/16 1:34 PM, Chris wrote:
>> [...]
>
> Here is the culprit:
>
> https://github.com/rejectedsoftware/vibe.d/blob/0.7.29/source/vibe/http/server.d#L1861
>
> And the definition of MaxHTTPHeaderLineLength is:
>
> https://github.com/rejectedsoftware/vibe.d/blob/0.7.29/source/vibe/http/server.d#L1861
>
> 4096 bytes.
>
> I'm not super-familiar with HTTP protocol requirements, but a further diagnosis of your net traffic may reveal that your browser is doing something unorthodox, or vibe needs to adjust here.
>
> -Steve
Thanks a million! I'll look into it tomorrow.
|
September 22, 2016 Re: vibe.d maxRequestSize | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris | On Monday, 19 September 2016 at 18:13:12 UTC, Chris wrote:
> On Monday, 19 September 2016 at 17:54:05 UTC, Steven Schveighoffer wrote:
>> On 9/19/16 1:34 PM, Chris wrote:
>>> [...]
>>
>> Here is the culprit:
>>
>> https://github.com/rejectedsoftware/vibe.d/blob/0.7.29/source/vibe/http/server.d#L1861
>>
>> And the definition of MaxHTTPHeaderLineLength is:
>>
>> https://github.com/rejectedsoftware/vibe.d/blob/0.7.29/source/vibe/http/server.d#L1861
>>
>> 4096 bytes.
>>
>> I'm not super-familiar with HTTP protocol requirements, but a further diagnosis of your net traffic may reveal that your browser is doing something unorthodox, or vibe needs to adjust here.
>>
>> -Steve
>
> Thanks a million! I'll look into it tomorrow.
FYI, I had to solve the issue by sending a form via a JS XMLHTTPRequest. maxRequestSize didn't help.
|
Copyright © 1999-2021 by the D Language Foundation