and added the get_content_length() function.
The process_server_headers() function was rewritten to remove the
Connection header correctly, and also retrieve the Content-Length value.
This value is needed in the relay_connection() function since there are
some remote machines which do not properly close down the connection once
the body has been retrieved. Thanks to James Flemer for finding a test
case for this problem.
itself to find out all the changes. Changed the process_client_header()
function to use the hashmap and vector modules. I've made this change to
better handle the Connection header. The Connection header, it it's
present, lists all the headers which should _not_ be transmitted any
further along. An HTTP/1.1 proxy must respect this.
Other changes are basically cosmetic.
16 KB.)
Added the TUNNEL_CONFIGURED() macro to help with testing for the tunnel
support code.
Create the write_message() function to encapsulate the code which sends
the information to the file descriptor.
Moved the tunnel code into it's own function.
Ignore any blank lines when tinyproxy is expecting a request line.
Instead of sending the request line to the remote server in pieces,
tinyproxy nows sends it in once go. This was done to fix a problem with
some sites like www.heise.de.
Changed all calls to connptr->ssl to connptr->connect_method.
Changed all calls to connptr->send_message to
connptr->send_response_message.
Moved the call to Via header code to inside to the tests to handle if
tinyproxy is sending an error message (don't need to send any headers.)
emptied when either socket is closed. This should be better for the tunnel
connections.
Change the connect_to_upstream() function to better utilize the
establish_http_connection() function. Code re-use is cool. :)
since they're now used in other places.
Added support for a true upstream proxy connection. This involved some
rewriting of the handle_connection() function and some of the support
functions so that they do perform the domain filtering and anonymous
filtering while still connecting to the upstream proxy. I think the code
should be cleaned up further.
changed the parsing code from REGEX and uri.c to a simplier sscanf()
method. Also, include code to handle SSL connections, but that's not quite
working yet.
Changed any reference to log() to log_message().
Fixed a potential memory leak in process_method().
Removed redundant code and variables in relay_connection().