RTC Forums
November 25, 2024, 03:12:48 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Limit data sent to the server via a POST request?
Pages: [
1
]
« previous
next »
Print
Author
Topic: Limit data sent to the server via a POST request? (Read 5433 times)
testmonkey
Guest
Limit data sent to the server via a POST request?
«
on:
December 17, 2009, 05:26:34 AM »
I have created a simple RTC Web Server using RtcHttpServer and RtcDataProvider. Version 2.83.
I would like to know what is the best way to limit data sent to the server via a POST request?
Presently I am waiting for Request.Complete to be true before processing the incoming data. This works fine, but I am concerned that a malicious client might try to flood the server with a huge amount of data in an attempt to break the server.
So instead of waiting for the POST request to complete, can I kill the request/connection after a certain x number of bytes?
Any thoughts/suggestions are welcome.
Thanks.
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Limit data sent to the server via a POST request?
«
Reply #1 on:
December 17, 2009, 05:45:35 AM »
You can always force the client to disconnect from the Server by using the "Disconnect" method from inside events triggered by the RTC SDK on your Server.
You might also want to take a look at the MaxHeaderSize and MaxRequestSize properties on the TRtcHttpServer component, but note that these properties are global (not per request) and should be handled carefully. Default value 0 means to limit, any other value sets the maximum number of bytes you will accept in a request (MaxHeaderSize = HTTP header, MaxRequestSize = complete request). If you want to accept file uploads, make sure this size is large enough to hold the largest file you want to allow for uploading.
Best Regards,
Danijel Tkalcec
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...