kill a compiler warning in UnixAddress::length

Change-Id: I74bdbc360b8961965985c8dc271b71762fcc1c46
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/64372
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
fixes #120360: look for boost in multiarch path

Change-Id: I849045414ae4ded7cfb3a489f35c95421d3df8a7
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/66145
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
Reviewed-by: Curtis Veit <veitc@mozy.com>
fix FiberEvent when autoreset is true

* should reset the m_signalled if the waiter is scheduled
* it's a regression introduced in fc9855

Change-Id: I3563d95cf2507c841e0c939825440a9110700d12
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/66357
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: FelixSun <felixs@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
refs #120360: use vanilla ax_boost_program_options.m4

Change-Id: Idd24ecfb58e3ddaea96b8fd94faf82a0d831dbba
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/66374
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
add an unit test for FiberEvent

Change-Id: I7d87ccd83828f937c714c8675c41cc17f9fb337b
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/66376
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
refs #120715: support 'Content-MD5' entity header

* This header is used for message integrity check
* We need to fix the bug: regal parsing standard HTTP headers is wrong
  while name matched but value mismatch.

Change-Id: Ic7fab876c07f348cfaa7f60a5d9d7c202f13ff12
Signed-off-by: Bo Shen <bos@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/66598
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kefu Chai <chaik@mozy.com>
Reviewed-by: Bert Yuan <berty@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
refs #120134: stream out the 'Content-MD5' header

Change-Id: Ie34ff31413c6a82e1fb52197e4862f4a0b032add
Signed-off-by: Bo Shen <bos@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/66809
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Eric Wang <leiw@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
refs #120860: introduce strict mode for HTTP header parser

* throw BadFieldValueException if an HTTP header is invalid in strict mode
* put the header name and value of header which does not confirm to standard
  into entity.extension in non-strict mode. this is the existing behaviour.

Change-Id: I79feca0f0a2f3cb3ff2ff523b67e0dbdfa60a39b
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/66669
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Bo Shen <bos@mozy.com>
Reviewed-by: Eric Wang <leiw@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
clearly define the rule of ConfigVar name

* current rule for ConfigVar name is too strict, e.g., digits can't be
  used in ConfigVar name

This change will clearly define the ConfigVar name rule as follows,
the name should match
* [a-z]+(\.[a-z0-9]+)*, or
* [a-z][a-z0-9]* if dot is not allowed when loading from configuration file

Major differences after the change
* ConfigVar name can't start with dot (.)
* ConfigVar name can contain but not start with 0-9

Change-Id: I2aa4a77fc3e3c733d9dad2bbbf64e090f857f1b9
Signed-off-by: Kevin Cai <kevinc@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/67026
Reviewed-by: Kefu Chai <chaik@mozy.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
exclude directories from coverage report

* remove following directories from coverage report
  - mordor/pq/tests/
  - mordor/examples/

Change-Id: I0d587d6f4ebc8f2a1f3874ea6e44b04bae3af62c
Signed-off-by: Kevin Cai <kevinc@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/67071
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
support AWS authorization parser

* AWS auth comes in the format of
  Authorization: AWS <access key>:<base64 encoded signature>
* update ragel to support AWS auth header parser
* rename AuthParam::base64 to AuthParam::param, the parameters after
  scheme is not necessary to be base64 encoded.
  NOTE: this will introduce application level code change to rename the
  member variable

Change-Id: I12180ac5ef1c643c369cc3e61c8c4736dca0606a
Signed-off-by: Kevin Cai <kevinc@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/67070
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kefu Chai <chaik@mozy.com>
Reviewed-by: Wen Zhao <wenz@mozy.com>
add http_parser tests to xcode proj

Change-Id: Idcbfd0f242305feb5ec2bc5bb32545147682d736
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/67217
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Grady Player <gradyp@mozy.com>
closes #121116, do not enforce format of auth-credentials

* follows RFC2616, RFC2617, RFC5849
* also extend token68 to support AWS and email address
* token68 is from http://tools.ietf.org/html/draft-ietf-httpbis-p7-auth-26

Change-Id: If7caa946aad88e2b4ead5307fbd63c4a40927f0d
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/67216
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
closes #122148: fix HTTPStream::response() interface in WRITE mode

* save m_response when doing zero size advice write
* set m_size when write operation done to avoid stat() in
  HTTPStream::response()

Change-Id: I46941e5fff0bfb7a6c5f897cb4480a6ba6b2a2e6
Signed-off-by: Kevin Cai <kevinc@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/68126
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Eric Wang <leiw@mozy.com>
refs #122624 - Missing unicode unit test on Mac

Also found statistics.cpp was not included in mac project file

Signed-off-by: Andrew Skowronski <andrews@mozy.com>
Change-Id: Ice01e77283379bb230974aaa2ab592072d3f6f10
Reviewed-on: https://gerrit.dechocorp.com/68950
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Zhaoding Wu <zhaoding.wu@mozy.com>
fixes #122624 - toUtf8 crashes on Mac with Chinese chars

Zhaoding pinpointed crashes to convertion utility when
a string made up entirely of 3-byte chinese characters was converted.

Kevin pointed out true nature of the bug in comments patch 1 - an extra
byte for the null termination must be allocated, otherwise CFStringGetCString
was failing and MORDOR_NOTREACHED macro hit.

A simple unit test is added to verify conversion of a specific
problematic string.

Change-Id: I4edc4f06ecb63a231ef6edb773a02998ac72a0c9
Signed-off-by: Zhaoding <zhaoding.wu@mozy.com>
Signed-off-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/68939
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
closes #118740: enhance ConfigVar to be lockable

* after Config::lock(true) is called, any changes to lockable
  ConfigVar will be rejected.

Change-Id: I6c6ebbd9d9e91b336880aff563e7c8dad34fafa2
Signed-off-by: Eric Wang <leiw@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/66193
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
refs #122908: remove space between values

* compliance with rfc2616 section 4.2: combine the multiple header
  fields into one "field-name: field-value" pair by appending each
  subsequent field-value to the first, each separated by a comma.

Change-Id: I297040c42ea7d212db4f058fca99ad05c74ad58c
Signed-off-by: Kevin Cai <kevinc@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/69134
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>