If the ServerFilter False Returns, then the client falls into the timeout for the connection instead of receiving my error code.
The client then has a timeout after a short time, if the filter returns false:
Why does this occur? I send an extra error code to identify the problem, but the client timeouts.
B4J Server Filter Code:
'Return True to allow the request to proceed.
Public Sub Filter(req As ServletRequest, resp As ServletResponse) As Boolean
If req.ContentLength > (3 * 1024 * 1024) Then
resp.SendError(413,"file too large") '3mb
Log("file too large")
Return False
End If
End Sub
The client then has a timeout after a short time, if the filter returns false:
B4A Client:
ResponseError. Reason: java.net.SocketTimeoutException: timeout, Response:
java.net.SocketTimeoutException: timeout
j.Response.StatusCode
is "-1"Why does this occur? I send an extra error code to identify the problem, but the client timeouts.