ilang commented on PR #761:
URL: https://github.com/apache/commons-vfs/pull/761#issuecomment-4216495303

   This PR now includes a fix for the Jackrabbit 1.x WebDAV test failure 
(`testFileCreate: expected 0 but was 112`) that was caused by the `getParent()` 
change.
   
   **What happened:** The embedded Jackrabbit 1.x test server bundles Jetty 
6.x, which does not drain unconsumed request bodies on 404 responses. When VFS 
sends a PROPFIND (112-byte XML body) to check if a file exists and gets a 404, 
then reuses the same persistent connection for a PUT to create the file, Jetty 
reads the stale PROPFIND bytes as the PUT body — storing the XML as file 
content.
   
   Before this PR, `getParent()` used `resolveFile()` which triggered an extra 
PROPFIND to the parent directory. That extra request happened to flush the 
stale bytes from the connection, masking the server bug. With 
`resolveFileInternal`, the PUT follows the 404 immediately, exposing it.
   
   This is a known class of Jetty issue — 
[jetty#651](https://github.com/jetty/jetty.project/issues/651), 
[jetty#4117](https://github.com/jetty/jetty.project/issues/4117), 
[jetty#6168](https://github.com/jetty/jetty.project/issues/6168). Fixed in 
Jetty 9.4+.
   
   **Fix:** Add `Connection: close` to the Jackrabbit 1.x test HttpClient 
configuration (second commit). No production code changes. Jackrabbit 2 tests 
already pass without any workaround.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to