POST message Length Limitation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

POST message Length Limitation

Siva Munnaluri
Reposting as my internet got disconnected, not sure the previous Post is
posted or not.
Hi LWIP Team,

We are using
http://git.savannah.nongnu.org/cgit/lwip.git/tree/contrib/examples/httpd/post_example
for posting JSON data from a web page. If the JSON characters are more than
3000, entire data is not available on web server side.

In lwipopts.h we found a vairable TCP_MSS which we set to (3000- 40). If we
increase it to 4000 we are getting lwip_sanity_check

#if TCP_SNDLOWAT >= (0xFFFF - (4 * TCP_MSS))
#error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must at least be 4*MSS
below u16_t overflow!"
#endif

Is there a way to accept POST messages with more than 3000 characters. Our
requirement is to post 15000 characters of JSON data.

Regards,
Siva



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: POST message Length Limitation

Ajay Bhargav-2
On Tue, Oct 8, 2019 at 7:47 PM Siva Munnaluri <[hidden email]> wrote:

>
> Reposting as my internet got disconnected, not sure the previous Post is
> posted or not.
> Hi LWIP Team,
>
> We are using
> http://git.savannah.nongnu.org/cgit/lwip.git/tree/contrib/examples/httpd/post_example
> for posting JSON data from a web page. If the JSON characters are more than
> 3000, entire data is not available on web server side.
>
> In lwipopts.h we found a vairable TCP_MSS which we set to (3000- 40). If we
> increase it to 4000 we are getting lwip_sanity_check
>
> #if TCP_SNDLOWAT >= (0xFFFF - (4 * TCP_MSS))
> #error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must at least be 4*MSS
> below u16_t overflow!"
> #endif
>
> Is there a way to accept POST messages with more than 3000 characters. Our
> requirement is to post 15000 characters of JSON data.
>
> Regards,
> Siva
>
>
>
> --
> Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users

Looks like you're confusing yourself with HTTP payload with TCP MSS.
For your reference: https://en.wikipedia.org/wiki/Maximum_segment_size

- Ajay Bhargav

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: POST message Length Limitation

goldsimon@gmx.de
In reply to this post by Siva Munnaluri
Am 08.10.2019 um 16:17 schrieb Siva Munnaluri:
> Reposting as my internet got disconnected, not sure the previous Post is
> posted or not.

The first one made it, no need to double-send...

> Hi LWIP Team,
>
> We are using
> http://git.savannah.nongnu.org/cgit/lwip.git/tree/contrib/examples/httpd/post_example
> for posting JSON data from a web page. If the JSON characters are more than
> 3000, entire data is not available on web server side.
>
> In lwipopts.h we found a vairable TCP_MSS which we set to (3000- 40). If we
> increase it to 4000 we are getting lwip_sanity_check

In the first message you wrote 400, not 4000. That confused me, but now
I see what you're getting at.

However, as Ajay wrote, your confusing things here. You should *never*
need to set TCP_MSS higher than 1460.

Instead, I guess you might have missed the fact that the post rx
callback gets called multiple times (as the segments arrive)?

Regards,
Simon

>
> #if TCP_SNDLOWAT >= (0xFFFF - (4 * TCP_MSS))
> #error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must at least be 4*MSS
> below u16_t overflow!"
> #endif
>
> Is there a way to accept POST messages with more than 3000 characters. Our
> requirement is to post 15000 characters of JSON data.
>
> Regards,
> Siva

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users