Skip to content

MaxRequestSize/MaxResponseSize and fixedLengthStreamedAfter unexpected behavior #780

@zaharidichev

Description

@zaharidichev

http.param.MaxRequestSize and http.param.MaxResponseSize have ambiguous semantics wheh combined with fixedLengthStreamedAfter

Expected behavior

I would expect that if fixedLengthStreamedAfter is set say 5 kilobytes and MaxRequestSize is set at 4 kilobytes, a message with Content-Length set to 6 kilobytes is processed as a streaming message without a problem

Actual behavior

What happens instead is that the message is dropped as it exceeds MaxRequestSize. To me (and I might be totally off here), this does not sounds correct. What I expect to happen is for fixed size message to always be streamed after a certain amound of length, despite the fact that there is limit on the MaxRequestSize. How fo these two settings relate in more detail? Isn't the purpose of fixedLengthStreamedAfter to enable the processing of arbitrary long messages without imposing a hard limit. Moreover, it seems at the moment http.param.MaxRequestSize and http.param.MaxResponseSize are capped at 2GB. This effectivelly means that there is no way to process a message that has Content-Length set and is larger than 2GB. Is it possible that the cap from these settings is removed. And if so, is that a good idea at all? Thanks for the clarification in advance.

Also, another question I have is how do the MaxHeaderSize and MaxInitialLineSize params relate to fixedLengthStreamedAfter? Are these necessary when the message is streamed? And if so, do they become reduntant when the message is larger than fixedLengthStreamedAfter?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions