If the ServerFilter False Returns, then the client falls into the timeout for the connection instead of receiving my error code.
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:
If i return True, then it works, but the filter is there to clarify in advance if the request is legitimate.
Then I don't understand the sense of the filter, if it returns a timeout with the return value "false" instead of my error code.
So the filter must return "True" and I must send the error code in the handler?
it works for me now too...
Funny, I even tried it yesterday in release mode, but it didn't work there either. Maybe I should have closed the project and started it again...