http: reduce network traffic for authorization
commitf266174acbf6dff8ca9d5f1665c8ee09eb55a9c9
authorStefan Becker <chemobejk@gmail.com>
Thu, 22 Aug 2013 16:53:32 +0000 (22 19:53 +0300)
committerStefan Becker <chemobejk@gmail.com>
Thu, 22 Aug 2013 16:53:32 +0000 (22 19:53 +0300)
treecdd4bf9a622844e94e36f06da592fc6454519d7f
parent08d21defaaf6dca8ac8e0c8a4c43f4e969e128c0
http: reduce network traffic for authorization

- Authorization: header never changes for Basic authentication scheme,
  so simply cache it. For Office 365 this reduces the network traffic
  considerably, because we only get one 401 response for the first
  request on a connection and not for every new request.

- don't throw away the security context unnecessarily. F.ex. a missing
  photo fetch returns 404, but that shouldn't invalidate the security
  context. Just throw it away for status codes 403, 407 and >= 500.
src/core/sipe-http-request.c
src/core/sipe-http-transport.h
src/core/sipe-http.h