[Box Backup-commit] [boxbackup/boxbackup] 1fc884: Test that 100-continue headers are sent and receiv...

GitHub noreply at github.com
Sat Oct 28 23:06:12 BST 2017


  Branch: refs/heads/s3_support
  Home:   https://github.com/boxbackup/boxbackup
  Commit: 1fc884c95286b855ccf2f55f3a70585016f4479a
      https://github.com/boxbackup/boxbackup/commit/1fc884c95286b855ccf2f55f3a70585016f4479a
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-10-28 (Sat, 28 Oct 2017)

  Changed paths:
    M test/httpserver/testhttpserver.cpp

  Log Message:
  -----------
  Test that 100-continue headers are sent and received correctly

This tests that HTTPRequest::SendHeaders includes the "Expect: 100-continue"
header only when expected. A separate test calls HTTPRequest::SendWithStream
which sends these headers, and therefore checks that both sides correctly
handle such exchanges.

(cherry picked from commit 5fad0fd1cb9a1a39756de69ce9348ca692e35bda)


  Commit: 6e26fcad0edcabf2d7f013f37b97328f303da05e
      https://github.com/boxbackup/boxbackup/commit/6e26fcad0edcabf2d7f013f37b97328f303da05e
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-10-28 (Sat, 28 Oct 2017)

  Changed paths:
    M lib/common/DebugMemLeakFinder.cpp
    M lib/common/MemLeakFinder.h

  Log Message:
  -----------
  Implement placement operator delete

"If the object is being created as part of a new expression, and an exception
is thrown, the object’s memory is deallocated by calling the appropriate
deallocation function. If the object is being created with a placement new
operator, the corresponding placement delete operator is called—that is, the
delete function that takes the same additional parameters as the placement new
operator. If no matching placement delete is found, no deallocation takes
place."

So to avoid memory leaks, we need to implement placement delete operators that
correspond to our placement new, which we use for leak detection (ironically)
in debug builds.

(cherry picked from commit 40cf96207139a31466b98a93298cef4f436eea6b)


  Commit: 41a5a16ccf7562175f08293f74220ce4d49b1bbf
      https://github.com/boxbackup/boxbackup/commit/41a5a16ccf7562175f08293f74220ce4d49b1bbf
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-10-28 (Sat, 28 Oct 2017)

  Changed paths:
    M lib/backupstore/BackupCommands.cpp
    M lib/backupstore/StoreTestUtils.cpp
    M lib/httpserver/S3Client.cpp
    M test/backupstore/testbackupstore.cpp

  Log Message:
  -----------
  Fix a long-standing bug in the set_refcount() test helper function

Previously it would truncate the expected refcount list at the first zero entry,
instead of just removing zero entries from the end.

Also move some test code to test_server_commands which should have been there,
since they were causing issues with the check for the refcount database in
test_server_housekeeping. It's hard to disentangle these two changes.

Also disconnect from the HTTP server in S3Client if we receive an exception on
reading, since the connection is no longer known to be in a clean state.

(cherry picked from commit 0ab2508cfd01a32dc39ce689d5b6b7e58a460e38)
(cherry picked from commit b91cdf14c5459f03076ee3668ef4a9c2b78f2227)


Compare: https://github.com/boxbackup/boxbackup/compare/b5ceaad01b66...41a5a16ccf75


More information about the Boxbackup-commit mailing list