afs commented on issue #628: JENA-1776: Set Content-Length when sending a graph or dataset URL: https://github.com/apache/jena/pull/628#issuecomment-552385237 Yes - this can cause an OOME. The only option to work with connection caching I can see are chunking or the in-memory serialization. This code path is used when the graph/dataset is a Java object. `graphToHttpEntity` and `datasetToHttpEntity`, the points where a customisation should override are both protected. This is the right way to customize. The path of loading a (large) file into a remote triplestore is different code path and it sets the length from the file using httpClient `FileEntity` which sets the Content-Length from the file. I don't like the idea of protected on the old code because it is broken in almost all cases of use in more than one transfer. I left it "for the record" and to have the method comment that this does not work over cached connections. "protected" seems encourage usage. I don't mind changing to protected from private but leaving code (3 lines) that will normally go wrong does not feel like a good idea. At least it can be copied (open source!) YMMV. @rvesse - do you have a usage that is sending a large amount of data via this code path?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
