[CALCITE-4196] Consume all data from client before replying with HTTP/401

SPNEGO's handshake involves sending an HTTP/401 to "challenge" the
client to reply with authentication data. If the client is sending
a significant amount of data in the original request, the client
will still be writing this data when the server replies. This causes
the client to receive a TCP Reset when it continues to write data, and
ultimately manifests in a "Broken Pipe" runtime exception.

The fix is to simply consume all data the client wrote prior to
responding with the HTTP/401.

Closes #127

Signed-off-by: Kevin Risden <krisden@apache.org>
8 files changed
tree: d1599a6dec8df8f6794a01741c165bed9af18573
  1. .github/
  2. bom/
  3. core/
  4. docker/
  5. gradle/
  6. metrics/
  7. metrics-dropwizardmetrics/
  8. noop-driver/
  9. release/
  10. server/
  11. shaded/
  12. site/
  13. src/
  14. standalone-server/
  15. tck/
  16. .editorconfig
  17. .gitattributes
  18. .gitignore
  19. .ratignore
  20. .travis.yml
  21. build.gradle.kts
  22. docker-compose.yml
  23. docker.sh
  24. gradle.properties
  25. gradlew
  26. gradlew.bat
  27. LICENSE
  28. NOTICE
  29. README
  30. README.md
  31. settings.gradle.kts
README.md

Build Status CI Status

Apache Calcite -- Avatica

Apache Calcite's Avatica is a framework for building database drivers.

Avatica is a sub-project of Apache Calcite.

For more details, see the home page.

Release notes for all published versions are available on the history page.