Replies: 1 comment
-
Try to chunk upload. By sending byte pieces if the server supports it. Perhaps something like this: `int SIZE = 10000 ; MappedByteBuffer mappedBuffer = ch.map( MapMode.READ_ONLY, 0L, ch.size( ) ); |
Beta Was this translation helpful? Give feedback.
-
If I try to send a large file to a WebDAV server (at least ours, which is running inside Jetty), the request dies with an error in the logs:
Over on the server, it's a bit more mysterious:
No entry ever ends up in the access log because HttpParser doesn't seem to acknowledge it as a valid request.
Posts on StackOverflow appear to suggest that this means the client is misbehaved and is sending data after the request is supposed to have ended, but I don't really know. If that is true, the problem in this case is either Sardine or Apache HTTP Client but I'm not really sure which.
I can log what goes over the wire and it looks fairly normal:
I can only guess that at some point the server decides that the request is too large and interrupts it. I have tried setting the max post size to
Integer.MAX_VALUE
at the Jetty side, but this appears to have no effect.Perhaps Sardine should be writing particularly large files one chunk at a time so that each individual request doesn't treat on the server's limit. Even if I figure out how to make this 600MB request go through, there would be other servers where I don't have access to the server in order to raise the limit.
Beta Was this translation helpful? Give feedback.
All reactions