Spurious error message.

(cherry picked from commit b0417461328aebd76e9fe9a8ab5feb8fd8a7b456)
Allow POST with no Content-Length.

Default to 0.  See RFC 7230 Sec. 3.3.2.

(cherry picked from commit 5446a5c7176a78b37a6260123582eade620d6ad9)
forbidden.c MSVC fix

The only file I had trouble compiling with MSVC v16 (Visual Studio
2010 Express), was forbidden.c. Du to the C89 (?) feature of data in
the middle of the code:

    regex_t *regex;

    if(rlen > 0) {

Can you please accept this patch for MSVC:

(cherry picked from commit 2f6e4c7b01dcbacc926ee33707ba0a6296103f34)
Addressed most feedback from code review #1:

* Introduced socksAuthCredentials as config variable
* kill socksAuthMethod
* simplified long conditionals
* truncated long lines

(cherry picked from commit a111c2dea9818bda5620f76ca317761900d321ff)
Remove C++-style comment.

Shame on you, Richard.

Non-author change :-
Removed a whitespace indroduced in this commit.

(cherry picked from commit 8f44948149f8cb7c3bd5f22e81f147c4a397036c)
Fix bug in urlDirname that prevents disk writeout.

Thanks to David Bonnes.

(cherry picked from commit 86306dd3bbdd631291da6d17a3ec1d4498836b22)
Update CHANGES.

(cherry picked from commit e40fbbe79024fd23d468e04d84ce5446d21e1b87)
Add support for OPTIONS method

I wrote a patch to add OPTIONS as a supported HTTP method in Polipo. This
arose out of the new use for the OPTIONS method for preflighted requests
in HTTP access control (CORS), which is used when a XMLHttpRequest call
across domain boundaries in reasonably current browsers (Chrome 4+,
Firefox 3.5+, IE 10+) utilizes either

* a HTTP method other than GET, HEAD or POST
* a content type other than plain text or form data
* a custom request header.

In my example, this occurs because a script on www.domain.com tries to
query a JSON file on api.domain.com, which fails with a 501 at the moment
when the page is requested via HTTP (obviously, it works over the tunneled
connection when requested via HTTPS).

See also:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Preflighted_requests

As per the spec (RFC 7231, section 4.3.7), responses to the OPTIONS method
are not cacheable, so I added OPTIONS as an equal alternative to POST and
PUT requests (especially since OPTIONS allows for an optional request body
as well, although this is unheard of in the wild).

This patch also could be easily extended to support the DELETE method
used by some RESTful web services.
https://github.com/jech/polipo/issues/26

(cherry picked from commit 108242d1edc21c32453b9e0a69d449a03fb85430)
Update CHANGES.

(cherry picked from commit 2a26790ee2894384f0ed16e99f26d1b686acb4b5)
Addressed most feedback from code review #1:

* Introduced socksAuthCredentials as config variable
* kill socksAuthMethod
* simplified long conditionals
* truncated long lines

(cherry picked from commit a111c2dea9818bda5620f76ca317761900d321ff)
Documented socksAuthCredentials.

(cherry picked from commit 55f24417b934c7f7bed380f97b76d0f8d8fc8212)
Update CHANGES.

(cherry picked from commit 3c655df1a3859e4e7efe7f38f699924babce6763)
Added "proxyOutgoingAddress" parameter to specify outgoing IP on multi-IP boxes

(cherry picked from commit 2e2d55d6b39154db0155368dcd208a1f8186d4b9)
Documenting "proxyOutgoingAddress" variable

(cherry picked from commit 948a87ff2e4b18155eb058850836a9f4fd6d7ffd)
Tweak documentation of proxyOutgoingAddress.

(cherry picked from commit 871fd130595eb0265da2b19fe82739a7b9d4131f)
Update CHANGES.

(cherry picked from commit e2b71d1963bbbc8442c72332590f5d02c4af7a6f)
add new DNS port to conncet to config variable

(cherry picked from commit 7339338f7b670325d665227625d4f0203aaf7e09)
document the new dnsNameServer variable in polipo.texi

(cherry picked from commit ade2bea2aaa60086fe59cbdc0a11d2d2664e1568)
Update CHANGES.

(cherry picked from commit da5597a84cc5bdd4405e8e503927540f3d4a7e84)
Fix typo in polipo.texi.

(cherry picked from commit bdbc1603d05801205dcf47898c9f07dbcfc6febf)