facebook/hhvm — pull request #1994 by jcarreiro (2014-03-06 01:00:44+00:00)
Title: Backport support for Expect header to libevent-1.4.14b.

I tested this on an Ubuntu 13.10 VM by:
- applying the patch to libevent-1.4.14b, then doing './autogen.sh && ./configure && make && make verify'
- installed the custom build of libevent using 'make install'
- cloned hhvm and followed the instructions to build it locally using the patched version of libevent
- ran 'hphp/test/run' (after fixing typo that causes a warning in php5) and checked that all tests passed
- created a simple script (test.php) that just echoed 'Works!'
- ran 'hphp/hhvm/hhvm -m server -p 2601', then did 'curl -vF method=get http://localhost:2601/test.php' and checked that the Expect header was handled correctly:
```
jcarreiro@moria:~/src/hhvm/hphp/third_party$ curl -vF method=get http://localhost:2601/test.php
* Adding handle: conn: 0x1bf8ca0
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x1bf8ca0) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 2601 (#0)
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 2601 (#0)
> POST /test.php HTTP/1.1
> User-Agent: curl/7.32.0
> Host: localhost:2601
> Accept: */*
> Content-Length: 144
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=------------------------33877ab62ff9f88d
>
< HTTP/1.1 100 Continue
< Date: Thu, 06 Mar 2014 00:57:09 GMT
< HTTP/1.1 200 OK
< Date: Thu, 06 Mar 2014 00:57:09 GMT
< Content-Type: text/html; charset=utf-8
< X-Powered-By: HHVM/2.5.0-dev
< Content-Length: 7
<
Works!
* Connection #0 to host localhost left intact
```