debugged and ensured it returns compressed content and size
Chrome, Firefox even command line wget.exe returns uncompressed data (wget with Accept-Encode headers set). Tried connecting from localhost to: 1.localhost (for debugging) and 2. remote server (production).
But ... when accessing my computer and production server from other machines, data is compressed ...This leads my mind, that some antivirus or other http protocol handler on localhost catches the response and manipulate it.
So... data is compressed!
Once I used to write protocol handlers. Before response hit the client it can be manipulated by several handlers. So I guess it is something like that sitting between the client and actual response.
For protocol handler point of view it does not mind who the client is.
Will give a try to wireshark tomorrow and let you know.
]]>Chrome, Firefox even command line wget.exe returns uncompressed data (wget with Accept-Encode headers set). Tried connecting from localhost to: 1.localhost (for debugging) and 2. remote server (production).
But ... when accessing my computer and production server from other machines, data is compressed ...
This leads my mind, that some antivirus or other http protocol handler on localhost catches the response and manipulate it.
]]>Which server class are you using?
The Socket-based or the HTTP.SYS-based?
What is the content type of the returned data?
We only compress 1KB of TEXT/ or APPLICATION/XML or APPLICATION/JSON kind of data.
Please ensure your server does execute the function CompressDataAndGetHeaders().
Use the debugger to see what's wrong.
Some protocol handler seem to decompress on the fly the http compressed response content and serve it uncompressed skipping Content-Encoding: deflate header from the http response.
If someone know how I can list/trace all protocol handlers in order to catch who is doing this will help a lot.
Thanks.
For the compression, which browser are you using?
]]>20131029 16374619 " EXCOS EAccessViolation (C0000005) at 001CF809 mORMot.TSQLRestRoutingREST.URIDecodeSOAByInterface (24348) stack trace API 001865C4 SynCommons.SynRtlUnwind (31512) 0000945C System.@HandleOnException
i := Server.Services.fListInterfaceMethod.IndexOf(URI); -> here Server.Services are nil
This happen every time when trying to call invalid (non-existing) method name of the rest server (and no interface services defined).
Maybe some handled error will be more suitable than showing AV exception with debug information to the client.
Also I was unable to get compression working.
Defined in the project COMPRESSDEFLATE, also tried to manually RegisterCompress, but with no luck.
Browser request compression, but the server never compress (tried also with big json as response).
Then you can use Table/TableIndex/TableRecordProps/TableEngine properties for direct access to the specified /TableName
]]>It is very handy to call Method based services and have TSQLRecordClass and record id in the TSQLRestServerCallBackParams context.
Is it possible to implement something like "ModelRoot/TableName/MethodName" ?
This will complement the use cases where method should be called against the whole table, without the need to specify it in additional url parameters.