Android Question xHttpServer: Requests over 7930 bytes are silently ignored, Handle event not triggered

Hello everyone,

I'm currently testing the aHttpServer library on Android and I've noticed some strange behavior.

It seems that if an incoming request has a body larger than exactly 7930 bytes, the server fails to process it. The only event that gets triggered is NewConnection. The main Handle event, which should process the request, is never fired.

There are no exceptions or errors shown in the logs; the request is simply ignored silently.

This leads me to a few questions:
  1. Could this be caused by a buffer size limit?
  2. If so, is it possible to configure this buffer size?
  3. Are there any known limitations on the request body size that I should be aware of?
Any insight on this would be greatly appreciated.

Thank you!

PS: B4A 13.40, aHttpServer 0.79.
 

DonManfred

Expert
Licensed User
Longtime User
request has a body larger than exactly 7930 bytes, the server fails to process it. The only event that gets triggered is NewConnection.
Are you sure you are sending/receiving them as POST-Data?
Sounds like you are checking against GET-Data.

PD: All in all it sounds like a mistake to use a httpserver in android. You should use JServer with B4J for Serversolutions.
 
Upvote 0
Thank you very much for your reply.
Are you sure you are sending/receiving them as POST-Data?
Sounds like you are checking against GET-Data.
Absolutely. I use a post call, using simple text (not structured text) as the body.

PD: All in all it sounds like a mistake to use a httpserver in android. You should use JServer with B4J for Serversolutions.
Unfortunately for the project I'm working on, I'm forced to use an httpserver library in Android.

The reason why I also opted to use the xHttpServer library (aHttpServer for Android) is its use as an asynchronous WebSocket.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Hello everyone,

I'm currently testing the aHttpServer library on Android and I've noticed some strange behavior.

It seems that if an incoming request has a body larger than exactly 7930 bytes, the server fails to process it. The only event that gets triggered is NewConnection. The main Handle event, which should process the request, is never fired.

There are no exceptions or errors shown in the logs; the request is simply ignored silently.

This leads me to a few questions:
  1. Could this be caused by a buffer size limit?
  2. If so, is it possible to configure this buffer size?
  3. Are there any known limitations on the request body size that I should be aware of?
Any insight on this would be greatly appreciated.

Thank you!

PS: B4A 13.40, aHttpServer 0.79.
It is a well -known defect in the library, I will check it as soon as I can have time available
 
Upvote 0
Top