[Box Backup-commit] [boxbackup/boxbackup] 546c0d: Refactor common HTTP header handling

GitHub noreply at github.com
Mon Nov 14 13:16:22 GMT 2016


  Branch: refs/heads/s3_virtual_host_name
  Home:   https://github.com/boxbackup/boxbackup
  Commit: 546c0d068934e8fc5ba53f32bdf61b3a6841c65b
      https://github.com/boxbackup/boxbackup/commit/546c0d068934e8fc5ba53f32bdf61b3a6841c65b
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M lib/httpserver/HTTPException.txt
    A lib/httpserver/HTTPHeaders.cpp
    A lib/httpserver/HTTPHeaders.h
    M lib/httpserver/HTTPQueryDecoder.cpp
    M lib/httpserver/HTTPQueryDecoder.h
    M lib/httpserver/HTTPRequest.cpp
    M lib/httpserver/HTTPRequest.h
    M lib/httpserver/HTTPResponse.cpp
    M lib/httpserver/HTTPResponse.h
    M lib/httpserver/S3Client.cpp
    M lib/httpserver/S3Simulator.cpp
    M test/httpserver/testhttpserver.cpp

  Log Message:
  -----------
  Refactor common HTTP header handling

Move the common code out of HTTPRequest and HTTPResponse into the new
HTTPHeaders class, a container for headers with some sensible HTTP-specific
behaviour.


  Commit: 80735e833618ffb542594f5fb75ab6ce7c745559
      https://github.com/boxbackup/boxbackup/commit/80735e833618ffb542594f5fb75ab6ce7c745559
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M lib/common/CollectInBufferStream.h

  Log Message:
  -----------
  Add CollectInBufferStream::Write(std::string)

Makes it easier to write strongly-typed strings as HTTP responses.


  Commit: bfdcbd30d59f846143e20dc81cb62a825f26f9fc
      https://github.com/boxbackup/boxbackup/commit/bfdcbd30d59f846143e20dc81cb62a825f26f9fc
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M lib/common/makeexception.pl.in

  Log Message:
  -----------
  Improve string representation of BoxExceptions.

Show the exception type as well as subtype in GetMessage().


  Commit: 5cbd708b2c347bdeb497701258b56014da498748
      https://github.com/boxbackup/boxbackup/commit/5cbd708b2c347bdeb497701258b56014da498748
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M lib/httpserver/HTTPServer.cpp

  Log Message:
  -----------
  Improve error messages returned by HTTPServer

Write strings by auto-converting to std::string, and format the HTML output
better, making it more readable.


  Commit: 39fc054bab20846a0f61c91208aaaaba6d780156
      https://github.com/boxbackup/boxbackup/commit/39fc054bab20846a0f61c91208aaaaba6d780156
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M lib/httpserver/S3Client.cpp

  Log Message:
  -----------
  Improve exception messages thrown by S3Client


  Commit: b81caf3cbad84b040ca529b6e469002f21594c8b
      https://github.com/boxbackup/boxbackup/commit/b81caf3cbad84b040ca529b6e469002f21594c8b
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M lib/common/BoxException.h
    M lib/httpserver/S3Simulator.cpp

  Log Message:
  -----------
  Improve exception handling in S3Simulator

Centralise error response generationImprove exception handling in S3Simulator,
driven by throwing and catching exceptions.

Add a method to BoxException to quickly check what type of exception it is, and
a macro to make this even shorter.


Compare: https://github.com/boxbackup/boxbackup/compare/b559015f072a...b81caf3cbad8


More information about the Boxbackup-commit mailing list