Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: Unable to ignore Request Content-Length for RTSP-over-HTTP to allow reading a HTTP POST until the socket closes or dies #64555

Open
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
@RogerHardiman

Description

@RogerHardiman

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

RTSP over HTTP Protocol (used in FFMPEG, VLC, Live555 and SharpRTSP etc) uses a Long Running HTTP POST.
I have to keep reading from the POST until the TCP socket closes (or dies).
I have to ignore any Content Length in the request, which is often set to 32767.

To ignore the Content Length I wrote Middleware to modify the ContentLength toMaxLong

Bug 1: Kestrel has already created a Http1ContentLengthMessageBody by the time my Middleware runs and it does not pass the newMaxLong value intoHttp1ContentLengthMessageBody
Http1ContentMessageBody then stops at 32767 bytes which is not what I want.

Bug 2: Or looking at it another way, Kestrel does not identify "Content-Type: application/x-rtsp-tunnelled" and use a Body Reader that can read forever (until the socket closes or dies)

Expected Behavior

For Bug 1 - Expected behaviour is for Kestrel to use the new Content Length (MaxLong) so I can read the TCP Socket forever (until the socket closes or dies)

OR for Bug 2 - the expected behaviour is for Kestrel to identify RTSP-Over-HTTP and ignore the Content Length automatically.

Steps To Reproduce

Full demo of the issue is at
https://github.com/RogerHardiman/kestrel_ignore_content_length

This creates two tasks.
Task 1 is a Server with Middleware to change Content Length to MaxLong
Task 2 uses TCPClient to send a POST request with a Content Length of 200. It then sends more than 200 data bytes.

Kestrel stops receiving data from the POST after 200 bytes. I need Kestrel to receive data on the POST forever, until the Socket closes or dies

Exceptions (if any)

It is not an exception.
I see the issue as HTTPRequest.Body.ReadAsync returning a read length of 0 (zero) bytes.

.NET Version

10

Anything else?

I'd be happy with any way to read from a POST until the socket closes or dies and ignore Content Length

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp